############################################### # # bash examples : # # The subdirectory moreExamples has .... more examples # ############################################### ############################################### # Examples that call unix commands or programs ############################################### getFileInfo.sh iperfScript.sh #bex1 ... bex3 : Set of simple examples ############################################### bex1.sh - Syntax: bex1.sh filename Summary: this script displays the file properties of the specified file. ############################################### ############################################### bex2.sh : this is a simple start to a top level script you can use to call other scripts. bex2Select.sh ############################################### ############################################### bex3.sh : this is a simple example of looping through the set of files in the current directory. It copies the *.sh files in the cd to the subdirectory ./tmp bex3sed.sh - variant that reduces bex3.sh to 5 lines: mkdir -p ./tmp LIST="$(ls *.sh)" for i in $LIST do sed '1a\# Add comment' $i > ./tmp/$i done ############################################### ############################################### # examples using find ############################################### filesUpdated.sh findBiggest.sh ############################################### # example system monitors ############################################### cpumon.sh sysmon.sh