Anonymous Anonymous - 1 month ago
442 0

No description

Bash

Shell Script

echo "Welcome"
echo "Please enter your User Name:"
read speak
echo "Welcome" $speak

menu="menu"
echo "~~~~~~~~~~~"
echo "MAIN MENU"
echo "~~~~~~~~~~~"
list="list"
echo "1.        View Directory Contents"
echo "2.        Display file contents"
echo "3.        Back up files"
echo "4.        Quit"


echo  "What do you want to do > "
read word
echo "You chose option $word"

if $1; then
        ls -d */
                echo "Which directory do you wish to view >";
fi

read dir
echo "Contents of $dir"

ls "$dir"

if $2; then
        ls -f */
                read file
                        echo " hi"