Skip to main content
Title, formatting, tags
Source Link
jasonwryan
  • 74.9k
  • 35
  • 204
  • 230

Help with sed print Print out certain line of file

Hey guys i needed help with a script I'm working on. I'm trying to print out all the words in misspelled  (which is "rools hatte" ).

But I keep being given the error sed: -e expression #1, char 17: unterminated `s' command

sed: -e expression #1, char 17: unterminated `s' command

I've tried different ways I've found on this website and elsewhere, but I always get this error regardless.

linecount="$(wc -l < misspelled)"

echo -e "MISSPELLED: \t\t\t CORRECT:"

for NUM in 'seq $linecount'

do

linecount="$(wc -l < misspelled)" echo -e "MISSPELLED: \t\t\t CORRECT:" for NUM in 'seq $linecount' do sed "${NUM}q;d" misspelled done 

done

Help with sed print out certain line of file

Hey guys i needed help with a script I'm working on. I'm trying to print out all the words in misspelled(which is "rools hatte" )

But I keep being given the error sed: -e expression #1, char 17: unterminated `s' command

I've tried different ways I've found on this website and elsewhere, but I always get this error regardless.

linecount="$(wc -l < misspelled)"

echo -e "MISSPELLED: \t\t\t CORRECT:"

for NUM in 'seq $linecount'

do

sed "${NUM}q;d" misspelled 

done

Print out certain line of file

I'm trying to print out all the words in misspelled  (which is "rools hatte" ).

But I keep being given the error

sed: -e expression #1, char 17: unterminated `s' command

I've tried different ways I've found on this website and elsewhere, but I always get this error regardless.

linecount="$(wc -l < misspelled)" echo -e "MISSPELLED: \t\t\t CORRECT:" for NUM in 'seq $linecount' do sed "${NUM}q;d" misspelled done 
Source Link

Help with sed print out certain line of file

Hey guys i needed help with a script I'm working on. I'm trying to print out all the words in misspelled(which is "rools hatte" )

But I keep being given the error sed: -e expression #1, char 17: unterminated `s' command

I've tried different ways I've found on this website and elsewhere, but I always get this error regardless.

linecount="$(wc -l < misspelled)"

echo -e "MISSPELLED: \t\t\t CORRECT:"

for NUM in 'seq $linecount'

do

sed "${NUM}q;d" misspelled 

done