Where Online Learning is simpler!
Chapter 5
Linux Shell Scripting
Learn UNIX by examples
Type and executate the Linux commands below:
$
$ cat foreach.csh #!/bin/csh # Purpose: To demonstrate the usage of foreach in C Shell (csh). # Author: Wahid Lutfy # CopyRight © MyWebUnivesity.com # Print a list of sports foreach sport ( Soccer Football Swimming Running Basketball Handball Teniss VoleyBall ) echo $sport end # Print a list of characters, upper-case, lower-case and numbers. foreach ch ( A B C D E F a b c d e f 1 2 3 4 5 ) echo $ch end # Print a list of fruits foreach fruit ( Apple Bannana Grape Orange Pear ) echo $fruit end
Back to Chapter 5 Shell Programming
Contact us
|
About us
|
Term of use
|
Copyright © 2000-2025 MyWebUniversity.com ™