Scripting Language Lab 2
Scripting Language Lab 2
Experiment 2
Debdatta Praharaj
21MVD1027
• head test2.txt
• head test2.txt : displays 10 lines from head part of the file
• head -3 test2.txt : displays first 5 lines from head part of
file
• Cut -c2-2 test2.txt : cuts the characters before 2 nd
position and after 5 th position of content of file
•
• Sed: stream editor. Used to edit (searching, find and
replace, insertion, deletion) the data.
• Tee : Takes the content from one file and writes output to
multiple files.
• Tac test2.txt | tee test9.txt : displays the content in
reverse order by creating a new file test9.txt