

Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Community
Ask the community for help and clear up your study doubts
Discover the best universities in your country according to Docsity users
Free resources
Download our free guides on studying techniques, anxiety management strategies, and thesis advice from Docsity tutors
4 semester shell examples ..contains example of shell programs
Typology: Assignments
1 / 3
This page cannot be seen from the preview
Don't miss anything!
$cat my_script.sh clear echo "This is my first shell script." echo "Today’s date is date | cut –d " " –f 1–3
" echo "Now the time is date | cut –d " "–f 4
" echo "GOOD LUCK" $ output $sh my_script.sh This is my first shell script. Today's date is Tue Nov 26 Now the time is 13:05: GOOD LUCK $
$cat readname.sh echo what is your name ? read name echo The name is $name. output : $chmod u+× readname.sh $readname.sh what is your name? murthy Example 4 $cat example echo Input a value for x read x echo the value of x is $x readonly x x=expr $x + 1
echo The value of x now is $x output : $sh example Input a value for x The value of x is 4 example: line 5: x: readonly variable