Bash Scripts

Collapse
X
Collapse
 

  • admin
    started a blog post Bash Scripts

    Bash Scripts

    Bash scripts are kind of the Linux version of DOS .bat files. Bash scripts have the extension .sh

    They are basically text files containing a list of command line actions to be carried out which save time if you're frequently running the same set of commands manually at the command prompt and they can also be used with Cron to have them automatically run at configured time intervals.

    To create a Bash script you would simply call your favorite text editor. For this example I will use nano ..
    Code:
    nano mybashscriptname.sh
    I would then type in each command prompt action I wanted and then save the file. Ctrl X Y will do this in nano.

    To call the script I would enter the command ...
    Code:
    bash mybashscriptname.sh
    and hit enter.

    The script can also be used is a similar way with Crontab as mentioned above.
      Posting comments is disabled.

    Related Topics

    Collapse

    Working...