This option will reset the home page of this site. Restoring any closed widgets or categories.

Reset

LINUX


Page 1 of 11

Shell Scripts Part 2

Create a small shell script, testVar2.sh: testVar2.sh #!/bin/sh echo “testVar is: $testVar” testVar=”my shell script” echo “testVar is: $testVar” Now run the script: $ ./testVar2.sh testVar is: testVar is: my shell script testVar hasn’t been set to any value, so it’s blank. Then we give it a value, and it... (Continue reading)

Tagged with:         

Shell Scripts Part 1

Here is a simple shell script to start with, #!/bin/sh MY_MESSAGE="Hello World" echo $MY_MESSAGE This assigns the string “Hello World” to the variable MY_MESSAGE then echoes out the value of the variable. Note that we need the quotes around the string Hello World. Whereas we... (Continue reading)

Tagged with:         

Page 1 of 11