sed s/bad/good/ < filename
Related Articles
Write a command to duplicate each line in a file?
sed ‘p’ < filename
Write a command to redirect the output of date command to multiple files?
The tee command writes the output to multiple files and also displays the output on the terminal. date | tee -a file1 file2 file3
Write a command to find the total number of lines in a file?
wc -l filename Other ways to pring the total number of lines are awk ‘BEGIN {sum=0} {sum=sum+1} END {print sum}’ filename awk ‘END{print NR}’ filename