Replies
Welcome, guest
Join CrazyEngineers to reply, ask questions, and participate in conversations.
CrazyEngineers powered by Jatra Community Platform
-
@abhishek-fg9tRh • Aug 22, 2012
Use vim or gedit or any editor to write shell script
syntax is : chmod permission your-script-name
for eg:
$ chmod +x your-scipt-name
$ chmod 755 your-script-name [will Read-write & execute for owner(7), while for group & other permission is read & execute(5)]
Executing the script:
$ bash bar(your-script-name)
$ sh bar(your-script-name)
$ ./bar(your-script-name)
. command-name
for example
$ .trollhard
Now try shell scripting
Open Gedit or Vim
type;
$ vi first # #My first shell script # clear echo "Trolls are cute"
Save the script & run using below command using "Executing the script" commands given above.