echo statement ...
echo Step 1
echo Step 2
echo statement ...
bash SHELL_SCRIPT
bash test.sh
bash has a feature that will helpecho I am going to my home directory cd echo I will show you that I am in my home directory pwd echo Here are the files in my home directory ls
bash with the -x option ...$ bash -x test.sh + echo "I am going to my home directory" I am going to my home directory + cd + echo "I"\""ll show you that I am in my home directory" I"ll show you that I am in my home directory + pwd /home/tsoro + echo "Here are the files in my home directory" Here are the files in my home directory + ls assignments_submitted html mail public_html bin it244 memo.bak scans code it341 memo.txt tests_taken course_files it441 nsmail tmp
bash
echo Step 1 cd pwd echo Step 2 ls echo Step 3 ls /home/tsoro/course_files/it244_files
$ bash hw99.sh Step 1 /home/tsoro Step 2 assignments_submitted it114 News bin it244 nsmail course_files it341 public_html examples it441 test html mail test_taken hw99.sh Mail vp Step 3 bother.sh numbers1.txt comment_test.sh numbers2.txt foo1.txt numbers.txt foo2.txt print_arg_numbers.sh foo.sh print_foo.sh foo.txt print_positionals.sh for_1.sh red_sox.txt for_2.sh repeat.py for_3.sh shell_test_1.sh fruit.txt shell_test_2.sh hello.sh test.sh hi_bye.sh
more or lessnano, vi, vim or emacsman or infoecho Step 5 go to your home directory
echo commandecho step 4
echo Step 4
cd
echo Step 5
ls
echo Step 4
cd
ls
it244gh@vm75:~$ echo Step 1
it244gh@vm75:~$ cd ~
it244gh@vm75:~$ pwd
/home/it244gh
echo Step 1
cd ~
pwd