- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Shell Redirect error
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-07-2009 11:52 AM
тАО01-07-2009 11:52 AM
DATE=`date +"%Y%m%d_%H%M%S"`
STARTLOG=$TUXSTDDIR/start_$DATE.log
tmboot -y > $STARTLOG 2>&1
I got an error i.e. Ambiguous output redirect error. Here the first part is to boot the account so there is nothing wrong with that. I have defined the startlog also but I dint understand why I am having problem here.
I dint get what that error means. I will appreciate any help to make this right.
thanks alot
Solved! Go to Solution.
- Tags:
- redirect
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-07-2009 12:08 PM
тАО01-07-2009 12:08 PM
Re: Shell Redirect error
You're using the evil C-shell. Use a real shell (Poxix, Korn, or Bash). Since this is HP-UX, use the Posix shell --- '/usr/bin/sh'.
See this :
http://www.faqs.org/faqs/unix-faq/shell/csh-whynot/
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-07-2009 12:21 PM
тАО01-07-2009 12:21 PM
Re: Shell Redirect error
#!/bin/ksh
DATE=`date +"%Y%m%d_%H%M%S"`
STARTLOG=$TUXSTDDIR/start_$DATE.log
tmboot -y > $STARTLOG 2>&1
doesnt that mean im using Korn shell?
and if lets suppose that is on csh how can I do something like that in csh? even complex way is fine just want to know how I can do it.
thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-07-2009 12:40 PM
тАО01-07-2009 12:40 PM
Re: Shell Redirect error
Hmmm, so you did specify Korn (#!/bin/ksh).
I could reproduce your "ambiguous output redirect" thusly:
# cat ./myredir.csh
#!/usr/bin/csh
set STARTLOG=/tmp/something
lvlnboot -y > $STARTLOG 2>&1
...but not with:
# cat ./myredir.ksh
#!/usr/bin/ksh
STARTLOG=/tmp/something
lvlnboot -y > $STARTLOG 2>&1
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-07-2009 12:44 PM
тАО01-07-2009 12:44 PM
Re: Shell Redirect error
Are you running your script remotely, as with an 'remsh' command?
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-07-2009 12:52 PM
тАО01-07-2009 12:52 PM
Re: Shell Redirect error
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-07-2009 01:11 PM
тАО01-07-2009 01:11 PM
SolutionIf you do:
# su - someuser /myscript
...and
Does this match what you are doing?
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-07-2009 01:19 PM
тАО01-07-2009 01:19 PM
Re: Shell Redirect error
echo $SHELL
and show us the output. Next, issue the command you're using to invoke this script
myscript parm1 parm2 ... parmN
and show us the output from that.
HP-Server-Literate since 1979
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-07-2009 01:24 PM
тАО01-07-2009 01:24 PM
Re: Shell Redirect error
tmboot -y > $STARTLOG 2>&1
to me it looks like it should work on korn shell but its not so What im asking is how can we do like that in csh.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-07-2009 01:34 PM
тАО01-07-2009 01:34 PM
Re: Shell Redirect error
> echo $SHELL
/usr/bin/ksh
> set DATE=`date +"%Y%m%d_%H%M%S"`
> set STARTLOG=$TUXSTDDIR/start_$DATE.log
> tmboot -y > $STARTLOG 2>&1
Ambiguous output redirect.
>
here i dont need any parameters and all and I can put this in a file or I can run like this which shouldnt make any difference.