Case Help
Cameron Simpson
cs at zip.com.au
Thu Aug 31 02:09:12 CST 2006
On 31Aug2006 11:35, David Drury <idavid at atdotdotnet.net> wrote:
| Running Ubuntu 6, which has a backup agent installed on it. I'm trying to
| apply a service pack, however the patch application is failing because it
| is runing the "uname -s" command which is returning "Linux" rather than
| "linux"
| I think a workaround would be to create a script that takes the output from
| "uname -s" and lowers the case, but returns anything else the same, as the
| alternative is to edit a large number orf patch scripts to change the case.
Sure. Note the location of uname as reported by "which uname".
Make a directory called for example "hackbin".
Create a shell script in there called "uname", like this:
#!/bin/sh -u
realuname=/path/to/real/uname
case "$*" in
-s) $realuname -s | tr '[A-Z]' '[a-z]' ;;
*) exec $realuname ${1+"$@"} ;;
esac
Then _prepend_ /full/path/to/hackbin to your $PATH and try running the
patch script.
Of course, for your special need that "... | tr ..." line could just be
"echo linux":-)
Cheers,
--
Cameron Simpson <cs at zip.com.au> DoD#743
http://www.cskk.ezoshosting.com/cs/
Another person who will NEVER buy anything inappropriately advertised on the
UseNet... - John Groseclose <caradoc at enet.net>
More information about the linuxsa
mailing list