The tag has no wiki summary.

learn more… | top users | synonyms

0
votes
1answer
107 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 ...
0
votes
3answers
580 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
4answers
78 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 ...
2
votes
9answers
6k 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 ...
1
vote
2answers
72 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
1answer
145 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
4answers
735 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
5answers
456 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 ...
2
votes
2answers
2k 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
2answers
172 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 ...
1
vote
2answers
717 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 > ...