This book shows how UNIX can be used effectively in the preparation of written documents, especially in the process of producing book-length documents, i.e. typesetting. Simply put, the tee command takes standard input and copies it to standard output, also making copies of it in zero or more files. How can I get the source directory of a Bash script from within the script itself? You can use the semicolon (;) to just tell bash to execute one command after the other, as if it was a script file. If no prefix is specified, it will use 'x'. Make sure, you keep '.sh' in the end. The procedure is as follows . How to remove a group of lines from a file? github.com/koalaman/shellcheck/wiki/SC2129, http://www.yourownlinux.com/2015/04/sed-command-in-linux-append-and-insert-lines-to-file.html, Podcast 375: Managing Kubernetes entirely in Git? Why can't observatories just stop capturing for a few seconds when Starlink satellites pass though their field of view? Just pass the filenames on the command line: tail -n 4 list-1.txt list-2.txt list-3.txt. Found inside – Page 103In the previous line we've outputted the contents of the /etc/passwd file and then piped the result to the grep command ... You can also take redirection a step further and redirect multiple times or use piping and redirection together. i: is the parameter that says sed to insert the line. Only append or write part needed root permission. How to append multiple lines to a file with bash, with "--" in front of string, Remove end of line characters from stdout? -name "*.html" -exec sed -i '$ a