# remove the last line
function ProcessDistFile {
# Overwrite the file with nothing.
# echo -n > $1
# Write the lines in reverse order
let startFrom=$2-1
if [[ $startFrom -ge 0 ]]
then
while [ $startFrom -ge 0 ]
do
# echo ${lines[$j]} >> $1 # the array is accessible since global. Does not need to be passed
echo "Element is ${lines[$startFrom]}"
startFrom=$[$startFrom-1]
done
fi
}
While Loop Reference
Subscribe to:
Post Comments (Atom)
Carlo Cipolla's Laws of Stupidity
"By creating a graph of Cipolla's two factors, we obtain four groups of people. Helpless people contribute to society but are...
-
To install pngwrite we need to install to helper library before we install pngwriter. 1. libpng 2. freetype2 We can use fink or macport to i...
-
"By creating a graph of Cipolla's two factors, we obtain four groups of people. Helpless people contribute to society but are...
-
Use 'Disk Utility' application to format the USB drive in MS-DOS (FAT) format Download the windows ISO file from the Windows websit...
No comments:
Post a Comment