for c programmers:
redirected cat
cat >> $out_file << EOF
first line of data
second line of data
more data
the end of the data
EOF
indented cat
cat >> $out_file <<-EOF
first line of data
second line of data
more data
the end of the data
EOF
ls -l $directory/*.log > $out_file 2>&1
simple menu
count=0
for file in `ls -1 $source_directory`
do
count=`expr $count + 1`
echo "$count: $file" >> $menu_file
done
echo "Please select a number from this menu"
cat $menu_file
read $choice
echo "Thanks"
filename=`grep $choice $menu_file | cut -f2 -d:`
echo "You chose [$filename]"
tr '[a-z]' '[A-Z]' < $in_file > $out_file
pipes
line_count=`wc -l $filename | cut -c1-8`
process_id=`ps -ef \
| grep $process \
| grep -v grep \
| cut -f1 -d\ `
upper_case=`echo $lower_case | tr '[a-z]' '[A-Z]'`