In: Computer Science
this is bash scripting.
a. Write a shell script that adds an extension “.deb” to all the files in a directory.
b. Write a command sequence or a script to insert a line “GHIJKLM” at every 10th line of a file?
c. Write a bash command or script to find all the files modified in less than 5 days and print the record count of each.
----------------------------------------------------------------------------------------------------------------------
Script to copy:
a) find . -type f -exec mv ‘{}’ ‘{}’ .deb\;
b) awk '{ if(NR==10){ print "GHIJKLM"} print $0}' NAME> NAME
c) find . -mtime -5 | wc -l