I have written a series of BASH scripts that I have grouped together into a software package I distribute to other users in my field. The package consists of a "master script", which users modify to specify particular processing variables. Depending on the variables specified, and their values, certain sub-scripts are then called to process data files.
As I mentioned, I have made this package of scripts available to download. Many users have limited UNIX experience, and I have tried to make everything as simple as possible. However one problem I have had is how to simplify the "installation" process.
The problem arises from the fact that users will install the folder of scripts in different locations. Therefore references to the master script, and all the subscripts it calls, will likely differ from user to user. For example, to run the master script one User 1 may have to type:
while User 2 will have to type:
And to call the first sub-script User 1's master script will need the line:
while User 2's master script will need:
It is obviously impossible to personalize scripts for every user. Does anyone have any suggestions on how to get around this? Is it as simple as telling everyone to install the scripts in their home directory (~)? Would that cause problems?
$0 Expands to the name of the shell script as it was called on the command line. By using parameter expansion${parameter%word} the smallest suffix pattern is removed. In this case everything after and including the last slash gets removed (/*), i.e. the name of the script itself. What remains is the absolute or relative path to the directory in which the scripts are located...
Heyas
If you recall, not too long ago, i was asking about the GNU Autotools. The feedback on that was almost unisense, and me figured that it turned my (back then) +98% SHELL project into a +73% GROFF project... :(
Felt a bit overhelmed, specialy since i didnt actualy use or need the true... (0 Replies)
Dear Members,
I have a table REQUESTS in Oracle which has an attribute REQUEST_ACTION. The entries in REQUEST_ACTION are like, ME, MD, ND, NE etc.
I would like to create a script which will will call other scripts based on the request action.
Can we directly read from the REQUEST_ACTION... (2 Replies)
Hi all,
I'm new to the world of Perl so may have gone about this in the wrong way (my background is mainly Java and Bash).
I have a Perl script (gallery.pl) which takes in various arguments (the only mandatory arguments is a directory full of images) and creates an HTML, standards compliant... (1 Reply)
Hi,
I have to write a program to compute the checksums of files
./script.sh
I wrote the program using bash and it took me forever since I am a beginner but it works very well.
I'm getting so close to the deadline and I realised today that actually I have to use normal Bourne shell... (3 Replies)
Hi all,
I have set up a cron job which calls another shell script shell script which in turn calls a Java process. The cron tab looks so.
0,30 7-18 * * 1-5 /u01/home/weblogic/brp/bin/checkstatus.sh >> /u01/home/weblogic/logs/checkstatus.log
The checkstatus.sh scripts looks like this.
... (4 Replies)
Is it possible to have a script watch a folder which contains other folders and split the contents into folders of under 700MB?
Not sure if I explained that very well, but I have on my server an 'archive' folder where finished work is dropped, it is then burned to CD for storage and deleted, I... (3 Replies)