Thursday, July 14, 2016

Shell Script Basic Code Examples(1)

Smiley face

first going to crate a folder in home directory

folder name shell

then go to that folder by command line

Smiley face

Execute Code

Smiley face Smiley face

Note

both are different methods to execute shell script

You can use "sh" or "./" for execute shell script

here "1" is shellscript file name

chmod 755 used to give file permissions

Code:print

Smiley face

Output:

Smiley face

Note

what ever you type into echo willbe the output also it create a newline

Code:read

Smiley face

Output:

Smiley face

Note

to print the variable use "$"

ex: $name

Code:Variales & Operations

Smiley face

Output:

Smiley face

Note

do the operations within "(())"

No comments:

Post a Comment

Wel Come !!! computer express