Questions tagged [bourne-shell]
The bourne-shell tag has no usage guidance.
12
questions
2
votes
1
answer
553
views
Can't figure out how to automatically set MariaDB root password without user intervention
I'm making a script that installs MariaDB, and I'd like to set a root password. I've got the following in said script:
DEBIAN_FRONTEND=noninteractive
echo mariadb-server-10.0 mariadb-server-10.0/...
1
vote
1
answer
2k
views
Setting enviromental variables for login shells under root account in FreeBSD
I am currently in the process of configuring Open Grid Scheduler in FreeBSD. As part of this process I need to set the environmental variableSGE_ROOTas root.
To do this I have been experimenting with ...
1
vote
2
answers
100
views
append & to the end of the particular command which I execute
I wish to append & sign to the end of particular command (say tkdiff) whenenver I
execute the command.
Please let me know what kind of alias / any other solution should I create
in bashrc.
...
0
votes
1
answer
181
views
ubuntu shell(sh) script missing some line
I create some script for a static route, called "my.rc.route" and i put it on /etc/rc.local, so everytime the server get restarted the script shall run after all the startup process.
I feel a bit ...
1
vote
4
answers
3k
views
How to check / start a process | error in shell script
If want to check if a process is running and start it if not. My script below is buggy and always says that a process is running. What is wrong?
$ ./check_n_run thisisnotrunning
./check_n_run: ...
1
vote
5
answers
578
views
selective backup script in bash
I've been using this simple command (that's all I can do :) to backup the whole tree from my user data in NAS server for a year.
cp -r /STORAGE /BACKUP-STORAGE/YYYY-MM-DD
Unfortunately, after a year ...
2
votes
2
answers
7k
views
difference between braces and normal brackets in bash?
what is the difference between braces and normal brackets in bash?
FYI... I did not get it in the related questions list and also not able to locate it in questions search. Please point me to the ...
0
votes
3
answers
2k
views
Other than .profile, where do shell environment variables get defined?
Using Bourne shell on Solaris 10, there are many environment variables defined that are not in the .profile. Where and how do these get defined?
0
votes
4
answers
95
views
How to resolve a path's correct ending?
I got a shell variable holding this path
/usr/share/man/man1/bitmap.1
There COULD be a file named bitmap.1, but it could also be bitmap.1.z, bitmap.1.gz, bitmap.1.Z.
Now I want to pass the real ...
0
votes
2
answers
232
views
Remove parts of a path using parameter expansion... but how?
I need to remove the part
man1/bmtoa.1.gz
from the full path
/usr/share/man/man1/bmtoa.1.gz
so that it results in
/usr/share/man/
I've tried ${path#[!/]*/*} and ${path#/*/*} but both ...
1
vote
2
answers
954
views
CRON job erratic behavior with Bourne shell script
I have the following script, that runs normally when I type the script name at the prompt (logscript):
#!/bin/sh
dvar=`date +"%m\/%d\/%y"`
filedate=`date +%b%d%Y`
echo DSS1 > serverlog_${filedate}....
3
votes
9
answers
18k
views
sh scripting: how to mount a remote filesystem if it is not mounted?
In a bourne shell script (#!/bin/sh) how can check to see if a remote NFS share is mounted and, if it is not, mount it? I've got an ugly set of cat, greps and ifs using the output of 'mount' at the ...