Answered step by step
Verified Expert Solution
Question
1 Approved Answer
I have the following codes for a project that I'm already done writing the sed commands for it. sed -i '/^[[:space:]]*$/d' letter.txt sed -i -e
I have the following codes for a project that I'm already done writing the sed commands for it. sed -i '/^[[:space:]]*$/d' letter.txt sed -i -e '4 s/([^()]*) */800-/' letter.txt sed -i '/;/s/(0-1)(-)(-1) *$/\4\3\211/' letter.txt sed -i '14 s/Lane/Kent/' letter.txt sed -i 's/Lane/Ln/' letter.txt sed -i '12 s/654/ /g; 5/817/654/g;5/ /817/g' letter.txt sed -i "$ a p.s. your winnings must be claimed by February 29th. letter.txt sed -i '45/$/ /;55/$/ /;95/$/ /;105/$/ /;125/$/ /' letter.txt The commands work just fine when I enter them one by one into the console, but the instructors need us to make a .sed file and run all of them through there. This is what I have inside my .sed file so far: /^[[:space:]]*$/d 4 s/([^]*) */800-/ 1;/s/l(.V\(-1)/(-1) () *$/14\3\211/ 14 s/Lane/Kent/ s/Lane/Ln/ 12 s/654/ /g;s/817/654/g;s/ /817/g $ a p.s. your winnings must be claimed by February 29th. 45/$/ /;55/$/ /;95/$/ /;105/$/ /;12s/$/ / I run it using sed -- -E -f minor1. sed letter.txt and I get the following error in console: sed: file minor1.sed line 4: invalid reference 4 on 's' command's RHS Any help would appreciated! I have the following codes for a project that I'm already done writing the sed commands for it. sed -i '/^[[:space:]]*$/d' letter.txt sed -i -e '4 s/([^()]*) */800-/' letter.txt sed -i '/;/s/(0-1)(-)(-1) *$/\4\3\211/' letter.txt sed -i '14 s/Lane/Kent/' letter.txt sed -i 's/Lane/Ln/' letter.txt sed -i '12 s/654/ /g; 5/817/654/g;5/ /817/g' letter.txt sed -i "$ a p.s. your winnings must be claimed by February 29th. letter.txt sed -i '45/$/ /;55/$/ /;95/$/ /;105/$/ /;125/$/ /' letter.txt The commands work just fine when I enter them one by one into the console, but the instructors need us to make a .sed file and run all of them through there. This is what I have inside my .sed file so far: /^[[:space:]]*$/d 4 s/([^]*) */800-/ 1;/s/l(.V\(-1)/(-1) () *$/14\3\211/ 14 s/Lane/Kent/ s/Lane/Ln/ 12 s/654/ /g;s/817/654/g;s/ /817/g $ a p.s. your winnings must be claimed by February 29th. 45/$/ /;55/$/ /;95/$/ /;105/$/ /;12s/$/ / I run it using sed -- -E -f minor1. sed letter.txt and I get the following error in console: sed: file minor1.sed line 4: invalid reference 4 on 's' command's RHS Any help would appreciated
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started