example programs in shell scripting

Programming
Tutor: None Selected Time limit: 3 Days

unix shell scripting programs
Aug 21st, 2013
Example Shell Script: Convert Filenames to Lowercase 6/8
A script to convert the specified filenames to lower case.


if test $# = 0
then
echo "Usage $0: <files>" 1>&2
exit 1
fi

for filename in "$@"
do
new_filename=`echo "$filename" | tr A-Z a-z`
test "$filename" = "$new_filename" && continue
if test -r "$new_filename"
then
echo "$0: $new_filename exists" 1>&2
elif test -e "$filename"
then
mv "$filename" "$new_filename"
else
echo "$0: $filename not found" 1>&2
fi
done

http://www.cse.unsw.edu.au/~cs2041/12s2/lec/shell/examples.notes.html
Aug 30th, 2013

Studypool's Notebank makes it easy to buy and sell old notes, study guides, reviews, etc.
Click to visit
The Notebank
...
Aug 21st, 2013
...
Aug 21st, 2013
Feb 21st, 2017
check_circle
Mark as Final Answer
check_circle
Unmark as Final Answer
check_circle
Final Answer

Secure Information

Content will be erased after question is completed.

check_circle
Final Answer