Do you want BuboFlash to help you learning these things? Or do you want to add or correct something? Click here to log in or create user.



Question
In linux, use sed to insert the line "hello there" at the end (i.e. AFTER last line) of file, test.txt, where output is just sent to stdout.
Answer
sed -e '$a \
hello there' test.txt
^^ note the use of the $a syntax to insert after last line

Question
In linux, use sed to insert the line "hello there" at the end (i.e. AFTER last line) of file, test.txt, where output is just sent to stdout.
Answer
?

Question
In linux, use sed to insert the line "hello there" at the end (i.e. AFTER last line) of file, test.txt, where output is just sent to stdout.
Answer
sed -e '$a \
hello there' test.txt
^^ note the use of the $a syntax to insert after last line
If you want to change selection, open document below and click on "Move attachment"

8. Streams and sed -- The Stream Editor
(or the end of the file if one does not exist). This behavior applies just as well to to insertions: sed -e '/Love Jane/i\ Love Carol\ Love Beth' Note that the $ symbol indicates the last line: <span>sed -e '$i\ The new second last line\ The new last line.' and finally, the negation symbol, ! , is used to match all lines not specified; for instance, sed -e '7,11!D' deletes all lines except line

Summary

statusnot learnedmeasured difficulty37% [default]last interval [days]               
repetition number in this series0memorised on               scheduled repetition               
scheduled repetition interval               last repetition or drill

Details

No repetitions


Discussion

Do you want to join discussion? Click here to log in or create user.