In order to make a school project easier, I want to append a delimiter to each line beginning with a capital letter with a bash script. Could anyone help me out? I've tried reading the file line-by-line in tandem with the case command but it doesn't work I don't really understand what I'm doing. This is what i have so far: (I'm new to scripting, don't flame me)
#!/bin/bash
input=/home/user/file
while IFS= read -r var
do
case [A-Z]
sed 's/^/#/' file
done
sed '/^[A-Z]/s/^/#/' "$input"
. – Jun 30 '20 at 07:16