I create symbolic link to the file - /etc/rc3.d/platform.bash from /var/tmp/platform.bash
ln -s /var/tmp/platform.bash /etc/rc3.d/platform.bash
script exist under /var/tmp :
-rwxr-xr-x 1 root root 58442 Aug 30 08:49 platform.bash
view from /etc/rc3.d :
lrwxrwxrwx 1 root root 31 Aug 30 06:33 S99platform.bash -> /var/tmp/platform.bash
How can I find out whether a script is written in bash or sh?
The first line of the script is not helpful here, since on Linux, bash scripts have this line:
#!bin/sh
Actually, there are many distribution where bin/sh is bash (maybe bin/sh is a link to bin/bash in those distributions), and not Bourne Shell.
First of all, if you're going to have to use source control, get something FOSS - like git, or subversion, or mercurial, etc.
I have a simple bash script which runs great as a regular user. When launched from postfix, it runs as nobody:nobody which prevents many commands from working.
Is it possible for the script to change to another user account while running, to allow these other programs to run?
Thanks
I'm using the linux 'script' command http://www.linuxcommand.org/man_pages/script1.html to log all input and output in an interactive bash script.
At the moment I have to call the script command, then run my bash script, then exit.
I want to run the script and exit commands from within the actual bash script itself.
Possible Duplicate:
How do I handle switches in a shell script?
Most common shell commands allow the user to specify options in any random order. Positional Parameters like $1 as commonly used in bash (I tend to write all my scripts in Bash but I don't think this question is actually Bash specific) scripts on the other hand, are order specific.
Just a quick script to reverse some input, using Bash and the FOSS "rev" program. It's amazing how easy it is to manipulate things with Bash. I love it!#!/bin/bash #Simple script to reverse an input nameecho "Enter your name";read 'myname' echo "Your name spelled backwards is: $( echo $myname | rev )" exit 0 That's all there is to it!Amazing eh?
I am writing a bash script to run test some scripts.
The names scripts of the scripts to tests are stored in an array.
Code:
scptArr[1]='chcksfrd.bash'
scptArr[2]='compute-misfit.bash'
scptArr[3]='compute-travel-times.bash'
scptArr[4]='create-data-tinv.bash'
scptArr[5]='create-docs.bash'
scptArr[6]='create-model.bash'
scptArr[7]='darwin-ga.bash'
scptArr[8]='listdir.bash'
scptArr[9]=
I've learnt the basics of programming in bash.