



Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Community
Ask the community for help and clear up your study doubts
Discover the best universities in your country according to Docsity users
Free resources
Download our free guides on studying techniques, anxiety management strategies, and thesis advice from Docsity tutors
Find Shell Scripts,Writing a Conversion Scripts,Creating a Simple Cryptography Function and Geographic Data Manipulation.
Typology: Exercises
1 / 6
This page cannot be seen from the preview
Don't miss anything!
$ example command
continues
and continues
example command continues and continues 0 Download and unpack the exercise files (do that first time only):
$ tar xzvf advanced_linux-exercise.tar.gz
1 Find shell scripts
1) How many shell script files there are in /usr/bin directory?
2 Writing a conversion script
0) Unpack the jpegs.tar file $ cd FileRename $ tar xvf jpegs.tar 1) Find out what directories and files were created $ ls *.jpg
$ convert – delay 30 – loop 2 *.jpg animation_small.gif
$ animate animation_small.gif 2) Resize and convert files
$ mv 0_singleframe_small.jpg 0 0_singleframe_small.jpg
$ convert – resize 200% 0_singleframe_small.jpg 00_singleframe_large.jpg
$ convert – resize 200% 10_singleframe_small.jpg 10_singleframe_large.jpg
$ for i in {0..9}; do ls ${i}_singleframe_small.jpg;
echo "converting to 0${i}_singleframe_small.jpg"; done
$ rot13 <<< “Make it right once and for all” $ rot13 crypt_input1 crypt_input
4 Geographic data manipulation
$ wget ftp://sidads.colorado.edu/pub/DATASETS/AGDC/luyendyk_nsidc_0119/*
$ tar xvzf luyendyk_nsidc_0119.tgz
$ ls - l *.txt
$ head – n 10000 srfelev.txt > srfelev_reduced.txt $ head – n 10000 icethick.txt > icethick_reduced.txt
$ gnuplot showdata1.gp
$ sudo apt-get install gnuplot-X
$ cat - n srfelev_reduced.txt |grep "79.6000"
Wy-Y11a
$ cat - n icethick_reduced.txt |grep "79.6000" 1962 - 79.600072 - 144.39008 681.5 1998 358 10256.30 RTZ8/32
Wy-Y11a
$ tail - n 7121 srfelev_reduced.txt > srfelev_reduced2.txt $ tail - n 8038 icethick_reduced.txt > icethick_reduced2.txt $ gnuplot showdata2.gp
$ cat - n srfelev_reduced2.txt |grep "79.2000" 5892 - 79.200076 - 147.74868 … $ cat - n icethick_reduced2.txt |grep "79.2000" 5739 - 79.200076 - 147.74868 …