beginners bash scripts

04/30/2013

Bash Scripting useful Unix commands
Destructions of where to save a shell file to call it from a command line
did I mention I was a n00b at shell scripts 🙂
Advanced Bash-Scripting Guide
50 Linux Commands

And here’s my first simple script ‘alter’, saved in my /bin directory.
#!/bin/bash
FILENAME="$1"
sudo cp ${FILENAME} ${FILENAME}.old
gksudo gedit ${FILENAME}

From the CLI type: alter filename
a copy is then taken of the file, and named filename.old, and filename is opened up in an editor window 🙂

Leave a Reply:

Your email address will not be published. Required fields are marked *

15 + six =