- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - Linux
- >
- Re: Output redirection help in ksh script
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
тАО04-25-2006 07:22 AM
тАО04-25-2006 07:22 AM
Re: Output redirection help in ksh script
If so then the syntax requires a ; before the closing right curly bracket.
HTH
-- Rod Hills
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-25-2006 07:29 AM
тАО04-25-2006 07:29 AM
Re: Output redirection help in ksh script
{ fbackup $backup_type -u $verbose_option $nfs_option -g $graph_file $index_opt
} $logfile 2>&1
+ fbackup -0 -u -n -g /bow/bowgraph -I /bow/backuplogs/25Apr06.full -c /bow/backup_config -d /bow/fbackupfiles/dates -f /dev/rmt/0m
fbackup(1004): session begins on Tue Apr 25 15:18:36 2006
fbackup(3203): volume 1 has been used 10 time(s)
fbackup(3024): writing volume 1 to the output file /dev/rmt/0m
fbackup(1102): WARNING: unable to stat file /entsys/tmp/cos.003354981498422125.1385.6
fbackup(3005): WARNING: file number 33092 was NOT backed up
fbackup(1030): warnings encountered during backup
fbackup(3055): total file blocks read for backup: 21283397
fbackup(3056): total blocks written to output file /dev/rmt/0m: 21851691
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-25-2006 07:50 AM
тАО04-25-2006 07:50 AM
Re: Output redirection help in ksh script
As Rodney noted, a a final semicolon is required after the last statement in curly braces. I agree that you last post seems correct otherwise. That aside, I use this in one of my scripts:
# ( /usr/sbin/fbackup -f $FB_DEV -0 -u -v -g $FB_GRF -V $FB_VOL -c $FB_CNF 2>&1 ; echo $? > $FB_XIT ) | tee -ia $FB_LOG
The approach I that I took here uses a sub process (and yes, there is not a semicolon in this syntax) but writes STDOUT and STDERR to ${FB_LOG} as well as the terminal.
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-25-2006 07:58 AM
тАО04-25-2006 07:58 AM
Re: Output redirection help in ksh script
1>$logfile 2>&1
This fbackup command is inside a script and I am trying to save the output and/or error/warnings in the $logfile. I am apparently not seeing what is wrong with the syntax.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-25-2006 08:05 AM
тАО04-25-2006 08:05 AM
Re: Output redirection help in ksh script
2>&1 >> $logfile
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-25-2006 08:11 AM
тАО04-25-2006 08:11 AM
Re: Output redirection help in ksh script
Thanks for all the help and for putting up with my typo.
- « Previous
-
- 1
- 2
- Next »