|
Search Forums:
|
|||||||
| Forums | Register | Forum Rules | Linux and Unix Links | Man Pages | Albums | FAQ | Users | Calendar | Search | Today's Posts | Mark Forums Read |
| UNIX for Advanced & Expert Users Expert-to-Expert. Learn advanced UNIX, UNIX commands, Linux, Operating Systems, System Administration, Programming, Shell, Shell Scripts, Solaris, Linux, HP-UX, AIX, OS X, BSD. |
|
|
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
then: then/endif not found
Hi All
I am getting this error when i try to run script from root using other user profile. Command I am running is "su - user -c command" Error envounterd "then: then/endif not found" Can any body please help me on this ... |
| Sponsored Links | |
|
|
|
#2
|
|||
|
|||
|
Try this...
su - user <enter passwd> then fire the commands.... -- Jayan Jayaseelan |
| Sponsored Links | ||
|
|
|
#3
|
|||
|
|||
|
yes it is working like that...but i want to run it in single sommand as i want to crontab it.
It is working on one of my xun machine but not working in the other... |
|
#4
|
|||
|
|||
|
The syntax from root cron would usually be: Code:
su user -c "command" Obviously this does not execute the user's profile - which is often an advantage. Can you post the contents of the script and state which shell you are using? "endif" is from csh. Last edited by methyl; 06-05-2009 at 12:20 PM.. Reason: Correction about "endif". |
| Sponsored Links | |
|
|
#5
|
|||
|
|||
|
the script is not running in c shell for bash shell its ok.
how can we check for c shell dependencies |
| Sponsored Links | ||
|
|
![]() |
| Thread Tools | Search this Thread |
| Display Modes | |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| EOF not found | uxuser | Programming | 3 | 11-17-2008 10:21 AM |
| -sh: H: not found | deal732 | Solaris | 1 | 05-29-2007 04:24 PM |
| Surrounding a chunk of code by #ifdef and #endif | xxxaxa | Shell Programming and Scripting | 6 | 05-09-2007 01:23 PM |
| how can i check in csh if command found or not found ? | umen | Shell Programming and Scripting | 2 | 03-03-2007 06:38 PM |
| sag.sh[11]: SAG: not found | sommer_queen | Shell Programming and Scripting | 1 | 09-13-2006 09:20 AM |
|
|