- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - Linux
- >
- Redirect standard error
Operating System - Linux
1755960
Members
4186
Online
108839
Solutions
Forums
Categories
Company
Local Language
юдл
back
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
юдл
back
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
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Go to solution
Topic Options
- 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
тАО08-15-2006 04:24 AM
тАО08-15-2006 04:24 AM
Re: Redirect standard error
Well, Ryan, being mathematically limited is a personal problem but it's not too late to fix. In all seriousness, once the bunch of engineers that I once had to support saw that I could handle differential equations, it was duck soup. Of course, I told them it was alright to be engineers; at least they weren't chemists. Using "The Force" I sense that you are probably supporting a bunch of guys doing Finite Element Analysis; if so, I am very familiar with the vendor supplied C Shell scripts and they were ugly. You may also be doing CFD but I really sense FEA. In my case, the only reason the C shell was used was to increase soft data ulimit values which both the Korn and POSIX shells now do.
If it ain't broke, I can fix that.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-15-2006 08:53 PM
тАО08-15-2006 08:53 PM
Re: Redirect standard error
The following command saves stdout and stderr to the files "out.txt" and "err.txt", respectively.
[root@server /root]# ./cmd 1>out.txt 2>err.txt
The following command appends stdout and stderr to the files "out.txt" and "err.txt", respectively.
[root@server /root]# ./cmd 1>>out.txt 2>>err.txt
The following command functions similar to the above two commands, but also copies stdout and stderr to the files "stdout.txt" and "stderr.txt", respectively.
[root@server /root]# (((./cmd | tee stdout.txt) 3>&1 1>&2 2>&3\
|tee stderr.txt) 3>&1 1>&2 2>&3) 1>out.txt 2>err.txt
[root@server /root]# ./cmd 1>out.txt 2>err.txt
The following command appends stdout and stderr to the files "out.txt" and "err.txt", respectively.
[root@server /root]# ./cmd 1>>out.txt 2>>err.txt
The following command functions similar to the above two commands, but also copies stdout and stderr to the files "stdout.txt" and "stderr.txt", respectively.
[root@server /root]# (((./cmd | tee stdout.txt) 3>&1 1>&2 2>&3\
|tee stderr.txt) 3>&1 1>&2 2>&3) 1>out.txt 2>err.txt
It Has Been...
- Tags:
- ksh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-16-2006 06:01 AM
тАО08-16-2006 06:01 AM
Re: Redirect standard error
Note that this was a C shell question so the last solution proposed is a non sequitur --- although valid for other (and arguably better) shells.
If it ain't broke, I can fix that.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-25-2007 07:57 AM
тАО04-25-2007 07:57 AM
Re: Redirect standard error
Ryan,
Redirect stdout first, then redirect to stderr
(find / -name foo -print > ~/bar) &> ~/bat
would be equivalent to
find / -name foo -print 1> ~/bar 2> ~/bat
in bash/korn
not that
( find / -name gimp -print > foo ) > & /dev/null &;tail -f foo is as easy as 2>/dev/null, but...
Redirect stdout first, then redirect to stderr
(find / -name foo -print > ~/bar) &> ~/bat
would be equivalent to
find / -name foo -print 1> ~/bar 2> ~/bat
in bash/korn
not that
( find / -name gimp -print > foo ) > & /dev/null &;tail -f foo is as easy as 2>/dev/null, but...
- « Previous
-
- 1
- 2
- Next »
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
News and Events
Support
© Copyright 2024 Hewlett Packard Enterprise Development LP