Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted!
- The problem statement, all variables and given/known data:
Use sed command to add the contents of variable my1stname to the beginning of file myinfo and show the results on the screen.
- Relevant commands, code, scripts, algorithms:
sed
- The attempts at a solution (include all code and scripts):
These might be terrible but here is my attempt:
cohenb@atlas:~$ cat myinfo | sed `/cat myinfo`/ i\$my1stname
bash: /cat: No such file or directory
sed: -e expression #1, char 1: unterminated address regex
cohenb@atlas:~$ cat myinfo | sed `/cat myinfo`/ i\` $my1stname`
> ^C
bash: :s^C: substitution failed
>
cohenb@atlas:~$ cat myinfo | sed/cat myinfo/ i\cat temp1
bash: sed/cat: No such file or directory
- Complete Name of School (University), City (State), Country, Name of Professor, and Course Number (Link to Course):
Sheridan College, Brampton, Canada, Roy Hasanizadeh, SYST 13416 Linux/Unix Operating Systems
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).