Quantcast
Channel: Scripting – LinuxFunda
Viewing all articles
Browse latest Browse all 10

Basic Shell Scripting: Chapter-I

$
0
0

If you are not a programmer and you are doing a repetitive task daily by issuing some commands to complete a task then, you can write a shell script to do the same thing for you by issuing a single command. It’s not required to type the command every time. Just write down the commands in a shell script and execute the script to complete your task. It’s so simple. In this article I will give you some basic knowledge about shell scripting.

Here are the steps to write a shell script:

  • Use a editor like “vi” or “vim” to write the script
    • vi clear.sh
  • Set execute permission to your script
    • chmod +x clear.sh
  • Execute your script
    • /bin/bash clear.sh
       or
      bash clear.sh
       or 
      /bin/sh clear.sh
       or 
      sh clear.sh
       or 
      ./clear.sh

Next Chapter


Viewing all articles
Browse latest Browse all 10

Trending Articles