Capturing output from grpck command on AIX


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Capturing output from grpck command on AIX
# 1  
Old 03-05-2008
Capturing output from grpck command on AIX

I'm having trouble capturing output from the following command on AIX:

grpck -n ALL > error.out

It gives me the results on the screen but my file is blank.

I have no trouble capturing output from "ls > ls.out", but doesn't seem to work with the grpck command.

Any ideas?

Thanks.
# 2  
Old 03-05-2008
Try to redirect Standard Error to a file:

Code:
grpck -n ALL > error.out 2>&1

# 3  
Old 03-05-2008
Thanks, that worked...I see that the output came out as error output.
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Capturing Output?

Hello All, I'm writing a Bash Script and in it I execute a piped command within a Function I wrote and I can't seem to redirect the stderr from the 1st pipe to stdout..? I'm setting the output to an Array "COMMAND_OUTPUT" and splitting on newlines using this --> "( $(...) )". By putting... (6 Replies)
Discussion started by: mrm5102
6 Replies

2. Shell Programming and Scripting

Capturing first output from 'top'-likes command

Is this a stupid code?? top > top.out & sleep 2 kill %1 cat top.out Thanks, (6 Replies)
Discussion started by: Shawn, Lee
6 Replies

3. AIX

How to mail the output of a command in AIX

Hi, I have mastered how to mail to Windows in AIX. Can anyone tell me how I would mail the output command df -g to an email? I want to set a job in cron to mail df -g as the contents of a mail. Any ideas? Thanks John (4 Replies)
Discussion started by: jfd7000
4 Replies

4. Shell Programming and Scripting

Capturing the output of dbv

Hello, We have an oracle database running on a Linux host (RHEL5)...I'm trying to run Oracle dbv (database verify utility) and capture its output to a file using the following syntax but the standart output does NOT get redirected to the file... dbv blocksize=32768 ... (2 Replies)
Discussion started by: luft
2 Replies

5. Shell Programming and Scripting

capturing output from top and format output

Hi all, I'd like to capture the output from the 'top' command to monitor my CPU and Mem utilisation.Currently my command isecho date `top -b -n1 | grep -e Cpu -e Mem` I get the output in 3 separate lines.Tue Feb 24 15:00:03 Cpu(s): 3.4% us, 8.5% sy .. .. Mem: 1011480k total, 226928k used, ....... (4 Replies)
Discussion started by: new2ss
4 Replies

6. Shell Programming and Scripting

Capturing the output from an exec command

Hi, I'm new to ksh - unix platform. I'm writing a small script which will search my current directory and will search for file names which it takes input from the users. Here is the code I'm having. 1 #!/bin/ksh 2 echo "enter a file name to be searched in the current dir : " 3 read... (1 Reply)
Discussion started by: avik
1 Replies

7. UNIX for Advanced & Expert Users

grpck error on AIX 5.3

I get the following output from grpck command: > grpck -n ALL 3001-227 User name "user1" not found in password file. 3001-233 Invalid admin value in /etc/security/group for "hypadm" 3001-238 Missing stanza for "lp" in /etc/group. I understand the first error, but I'm not clear on the... (0 Replies)
Discussion started by: pdtak
0 Replies

8. Shell Programming and Scripting

Capturing shell script command output

I am trying to check to see if a file exists on a ftp server, well, I know that cant be done, atleast directly, So I came up with this small script ftp -n $HOST <<END_SCRIPT quote USER $USER quote PASS $PASSWD cd public_html/crap dir $FILE quit END_SCRIPT Where the $ variable... (2 Replies)
Discussion started by: designflaw
2 Replies

9. UNIX for Dummies Questions & Answers

Capturing output from C++ program

Hi I have a C++ program that generates a lot of log information on the console, I need this output (printed using printf function) to go to a file since I will use crontab to schedule the job. I know I can do this: myprog > myfile but I don't know how to enter this in crontab. I use... (3 Replies)
Discussion started by: GMMike
3 Replies

10. Shell Programming and Scripting

capturing output in script

I have the following line in my script: $sftpcmd $rmthost <<COMMANDS>> $sftplog 2>&1 For some reason this is not capturing the errors from sftp, they go to the file attached to the cron entry ie mm hh dd MM * /myscript > cron.out any idea why? digital unix 4.0d (6 Replies)
Discussion started by: MizzGail
6 Replies
Login or Register to Ask a Question