24 March 2016

How to Write Your First ksh Script in UNIX

Stockphotos.io
Stockphotos.io
When you login into UNIX, you are first be in the home directory:

$/home:

Then you can issue 

$/home: cd jthomas

Then you come to your own directory:

$/home/jthomas:

How to write your first script:

$/home/jthomas: vi test.sh

Here, you can write your script.

The first line in the script is:

#!/bin/ksh  - It denotes which shell you are going to use.

Example:

$vi test.sh #!/bin/ksh ################################################### # Written By: Jason Thomas # Purpose: This script was written to show users how to develop their first script ################################################### # Denotes a comment
root
daemon bin sys adm uucp nobody lpd

How to run script
sh test.sh

Also read: The complete list of UNIX basic commands

No comments:

Post a Comment

Thanks for your message. We will get back you.

Featured post

10 top Blockchain real features useful to financial projects

Blockchain is basically a shared ledger and it has many special features. Why you need it. Business transactions take place every second...

Most Viewed