![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | 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 and shell scripting languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Help need to make a shell script run for ffmpeg vhook watermaking in shell | wingchun22 | Shell Programming and Scripting | 1 | 09-27-2008 06:52 AM |
| Changing cursor position using shell script | balamv | Shell Programming and Scripting | 2 | 06-02-2008 01:10 PM |
| Password changing in a Script (shell and expect) | chellam | Shell Programming and Scripting | 1 | 08-14-2006 11:12 PM |
| What's the difference: 'nuhup cmds' Vs 'cmds &' | billshu | SUN Solaris | 5 | 05-12-2004 11:01 PM |
| Changing korn shell script text Menu colors? | darthur | UNIX for Dummies Questions & Answers | 6 | 01-20-2002 07:15 PM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
Hi,
I am using HP-UNIX. I have a requirement as below I have to change env twice like: cadenv <env> cadenv <env> ccm start -d /dbpath ccm tar -xvf *.tar ccm rcv .... mv *.tar BACKUP but after I do the first cadenv <env> , I am unable to execute any of the later commands . I have tried using /bin/sh -c "cmd" but it does not seem to work. I have not sepreated these cmds by ; though. They are still seperated by newline. they look as below: cadenv <env> cadenv <env> /bin/sh -c "ccm start -d /dbpath" /bin/sh -c "ccm tar -xvf *.tar" /bin/sh -c "ccm rcv ...." /bin/sh -c "mv *.tar BACKUP" can someone please help? thanks, Charlei |
|
||||
|
How to run cmds after changing to a new env (shell) in a shell script
Hello Stanley
cadenv executes a script that takes it to a different environment (with its own set of variable. when I do a id command, it has an extra context value in it..) ccm is the command to start CM syerngy from the commandline. I have also tried the below: . . (exec cadenv..; exec cadenv..;exec bsh -q qname ![]() ccm start -d /dbpath .. this worked once, but does not work now... Tried as suggested by you, but does not work.. regards, Charlei |
|
||||
|
Try:
Code:
. cadenv Code:
. /path/to/cadenv |
| Sponsored Links | ||
|
|
![]() |
| Bookmarks |
| Tags |
| running cmds from diffrent shell, unix commands |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|