![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Rules & FAQ | Contribute | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts here. |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| script running with "ksh" dumping core but not with "sh" | simhe02 | HP-UX | 8 | 05-22-2008 02:46 AM |
| #!/bin/sh script fails at StringA | tr "[x]" "[y]" | by_tg | UNIX for Dummies Questions & Answers | 3 | 02-22-2008 08:17 AM |
| Development Releases: Linux Mint 4.0 Beta "Fluxbox", 4.0 Alpha "Debian" | iBot | UNIX and Linux RSS News | 0 | 01-04-2008 11:00 AM |
| Explain the line "mn_code=`env|grep "..mn"|awk -F"=" '{print $2}'`" | Lokesha | UNIX for Dummies Questions & Answers | 4 | 12-19-2007 09:52 PM |
| Making a "Recovery Partition" ?? | Akira | OS X (Apple) | 0 | 08-22-2007 07:02 PM |
|
|
LinkBack | Thread Tools | Display Modes |
|
|||
|
Making your script "universal"
I'm currently using Sun Solaris Unix. How can you make your unix bash or C script usable in all directories and subdirectories and not just the dir the script is located in? Essentially, to make it a command script as universal as a basic unix command like ls or cd.
Thanks for the help! |
| Forum Sponsor | ||
|
|
|
|||
|
Try this:
SunOS # ln -s /your/script /usr/bin /usr/bin must be in the PATH Enviroment Variable Than you can: SunOS # pwd /any/other/path SunOS # script Also have a look at the ln manpage Hope this helps networkfre@k |
|
||||
|
I'd suggest placing any custom site scripts within /usr/local/bin, and then adding that to the global PATH within /etc/profile for Bourne-compatibles (or /etc/csh.login, whatever). Then this is made available for all users.
This way /usr/local/bin should remain untouched in the event of an OS (or other major) upgrade, and hence all your hard work and custom scripting won't be hosed. Cheers ZB |