02-19-2010
Standard error output to Pipe input - solved
Hi,
I want to check a particular word is in standard error output or not. Can I acheive it in single command?
For example,
Delete file_name 2>error.log
cat error.log
Output:
XXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXX
Successfully deleted
XXXXXXXXXXXXXXXXX
where delete is some external program.
I want to do Delete <file name> and grep the word "Success" in the same command.
Thanks & Regards,
Poova.
---------- Post updated at 08:38 PM ---------- Previous update was at 08:35 PM ----------
Delete <file_name> 2>error.log | grep "success" error.log
Will the above command work with out any problem.
Thanks & Regards,
Poova.
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Hey guys, need some help. Running AIX Version 5.2 and one of our cron jobs is writing errors to a log file. Any ideas on the following error message.
Error: Internal system error: Unable to initialize standard output file
I'm guessing more info might be needed, so let me know.
Thanks (2 Replies)
Discussion started by: firkus
2 Replies
2. Shell Programming and Scripting
how can i redirect standard input? i dont remember :/, though could you redirec not from a command? i mean, to redirect always stdin and stout (1 Reply)
Discussion started by: Jariya
1 Replies
3. Shell Programming and Scripting
I'm writing a script using file descriptor 2 (std error) to send an email only if the command fails or errors out but the script always emails me irrepective of whether it fails or not. It will not email the /tmp/check.error file output if doesn't error out just the mail with the subject "Cannot... (3 Replies)
Discussion started by: barkath
3 Replies
4. Shell Programming and Scripting
Hi All,
How do I provide the output of a command to another command which is waiting for an input from the user ?
Ex : I need to login to a device via telnet. In the script, initially I use the "read" command to get the IP Address, Username and Password of the device from the user. Now,... (1 Reply)
Discussion started by: sushant172
1 Replies
5. Shell Programming and Scripting
Hello,
I would like to know if there is a shell in which operations such as 2| (redirect standard error of one process to the standard input of another one) exist?
I know it is possible to do it in bash with things like:
(process 2>&1) | other_process
but I find it a bit intricate when... (3 Replies)
Discussion started by: chlorine
3 Replies
6. UNIX for Dummies Questions & Answers
Hey, I'm completely new at this and I was wondering if there is a way that I would be able to redirect the log files in a directories standard output and standard error into and excel spreadsheet in anyway?
Please remember don't use too advanced of terminology as I just started using shell... (6 Replies)
Discussion started by: killaram
6 Replies
7. Red Hat
I ran the following command.
cat abc.c > abc.c
I got message the following message from command cat:
cat: abc.c : input file is same as the output file
How the command came to know of the destination file name as the command is sending output to standard file. (3 Replies)
Discussion started by: ravisingh
3 Replies
8. Shell Programming and Scripting
Hi,
I have many test*.ft1 files to which I want to read as input for a script called
pipe2txt.tcl and print the output in each separate file.
For example,
pipe2txt.tcl < test001.ft1 > test001.txt
How can I read many files in this maner?
thank you very much,
Best,
Pahuja (5 Replies)
Discussion started by: Pahuja
5 Replies
9. Homework & Coursework Questions
Just started learning Unix and received my first assignment recently. We haven't learned many commands and honestly, I'm stumped. I'd like to receive assistance/guidance/hints.
1. The problem statement, all variables and given/known data:
How do I write a shell script that takes in a file or... (4 Replies)
Discussion started by: fozilla
4 Replies
10. Red Hat
Hi issue with red hat and san.
I had a LUN shared to me from an oracle storage
I am able to see it and the size.
~]# multipath -ll
mpathe (3600144f0e984617b00005b466bd70014) dm-3 SUN,ZFS Storage 7430
size=10T features='0' hwhandler='0' wp=rw
|-+- policy='round-robin 0' prio=1... (0 Replies)
Discussion started by: goya
0 Replies
REARJ(1) Arj Software REARJ(1)
NAME
rearj - Converts other archive formats to .arj files
SYNOPSIS
rearj [options] <!listfile(s)|filespec(s)|wildname(s)>
DESCRIPTION
The rearj command can repackage other archive formats to arj.
OPTIONS
-+ Ignore REARJ_SW variable.
-a[suffix]
Convert archives within archives ("*" for all formats).
-bcommand
Execute command before extracting files.
-ccommand
Execute command on extracted files before counting them.
-d Delete original archives.
-e No error switch.
-f Convert diskette archives.
-g Skip creation of output archive.
-i[name]
Check integrity of rearj program.
-j Skip if output archive size is larger than the original.
-k Skip archive timestamping.
-l[name]
Write append log file (default name is rearj.log).
-m[date]
Select archives before date in YYMMDDHHMMSS format.
-n[date]
Select archives on or after date in YYMMDDHHMMSS format.
-o Allow overwrite of existing target archive.
-p Ignore long filenames under Windows 95.
-q Query for each archive to convert.
-r Recurse through subdirectories.
-s Skip verify of file count and total size.
-tsuffix
Create suffix type archives.
-u[bak]
Allow update of archive with backup (default is BAK).
-v Execute configured command on extracted files.
-wdir Assign work directory.
-x[!]file
Exclude by filename, wildname, or listfile.
-y[text]
Delete output archive and write text to log (testing mode).
-z Simulate operation.
ENVIRONMENT
REARJ_SW If set, its value will be used as command line options.
EXIT STATUS
0 Success.
1 File not found.
2 File is not a configured archive type.
3 Target archive already exists.
4 Not enough disk space.
5 User skipped or user did not select update option.
6 UNPACK command error.
7 PACK command error.
8 Target cannot support directories.
9 Wrong file count.
10 Wrong total size.
11 Internal archive REARJ error.
12 Rename archive error.
13 Invoked -v command error (found a virus?).
14 Output archive is larger.
EXAMPLE
rearj * -r -d
Convert all archives to ARJ format, searching all subdirectories, deleting original archives.
SEE ALSO
arj(1).
AUTHOR
This manual page was written by Ola Lundqvist <opal@debian.org> in pod format, then converted by Guillem Jover <guillem@debian.org> to
nroff format.
3.10 2003-03-10 REARJ(1)