Changed Problem its a sed actually...
Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted!
1. The problem statement, all variables and given/known data:
Use a sed command to create an output file from the input file. The input file is formatted such that every field of every line is delimited from the next field with a "#". The command shoule swap the second and the third field of every line. You must use a sed command. The input file is called lab2_6_in. The output file is called lab2_6_out.
2. Relevant commands, code, scripts, algorithms:
Command: sed
lab2_6_in has the contents:
AA#BBB#CCC#DDDD
GGG#HHHHHHHHHHHH
II#JJJ#KKKKKKKKK
LLLLLLLLLLLLLLLL
MMMM#MMMMMMMMMMM
3. The attempts at a solution (include all code and scripts):
sed 's/\(.*\#\)\(.*\#\)\(.*\#\)/\1\3\2/' lab2_6_in>lab2_6_out
I was able to change AA#BBB#CCC#DDDD to AA#CCC#BBB#DDDD but II#JJJ#KKKKKKKKK remains II#JJJ#KKKKKKKKK instead of beng substituted to II#KKKKKKKKK#JJJ. What is the problem with my command?
4. Complete Name of School (University), City (State), Country, Name of Professor, and Course Number (Link to Course):
De Anza College , Cupertino, USA, Dr. Ira Oldham, CIS15B (
CIS 18B Class Page)
Note: Without school/professor/course information, you will be banned if you post here! You must complete the entire template (not just parts of it).