This is the script I'm working on, I'm finished except for "displaying a file using cat" I'm unsure of the "wording". I know it's
to view a file. I tried doing
echo "Enter a filename"
I can't figure out what I missing.
I'm new to all of this and still tying too figure out all the commands. I would appreciate any insight you can give me.
while [ $leave = no ]
echo Hello $USER
1) Print current working directory
2) Delete a file
3) Rename a file
4) List all files in a current directory
5) Display contents of a file
6) Edit a file
7) Copy a file
8) Move a file
echo Please enter your selection $LOGNAME:
case $selection in
2) echo "Enter any $filename to be deleted"
echo $f1" is deleted";;
3) echo "Enter file to to rename"
echo "Enter new name of file"
mv $f1 $f2
echo $f1" is renamed as "$f2;;
4) ls -l;;
5) echo "Enter a filename"
6) echo "enter any file to be edited"
7) echo "Enter $filename to copy"
echo "Enter filename2 to be copied"
#cat $f1 > $f2
cp $f1 f2
echo $f2" is copied from "$f1;;
8) echo "Enter $filename to move"
echo "Enter filename2 where to be moved"
mv $f1 $f2
echo $f1" has been moved";;