Sponsored Content
Top Forums UNIX for Advanced & Expert Users Equivalents of tee command to find exit status of command Post 302526951 by vibhor_agarwali on Thursday 2nd of June 2011 03:14:50 AM
Old 06-02-2011
That won't give me the output on terminal.
I can later cat or tail it, but it won't be simultaneous.

I want to monitor the progress on my terminal & log the output for later reference.
 

10 More Discussions You Might Find Interesting

1. Programming

How to find the exit status of last command in Unix?

Hi, I want to find the exit status of the last executed command in C Shell. Tried $? but getting the error Variable syntax...$? does not seem to work in C shell.. is there any other command in C shell to find the exit status of last command? Thanks in advance, raju (1 Reply)
Discussion started by: rajugp1
1 Replies

2. UNIX for Dummies Questions & Answers

how to find the exit status for the last executed command

I am executing a find command in my script i.e find $2 -type f -name '*.gif' -mtime +$1 -exec rm {} \; how do i check that this command is executed properly.. i would lke t trap the errror and display my error message kinly help.. this is an urgent issue. (1 Reply)
Discussion started by: vijay.amirthraj
1 Replies

3. Shell Programming and Scripting

Getting the exit status of a remote command

Hi to everyone. How can I get the exit status from a remote command executed with rexec? :eek: machine A has RedHat Linux 9 and the remote machine B has SCO UNIX. Code: rexec -l user -p password host sh /u/files/scripts/seq_cal.sh 2006 08 I want the exit status returned by... (1 Reply)
Discussion started by: zoonalex
1 Replies

4. UNIX for Dummies Questions & Answers

Move Command and exit status problem

Hi All, I am using the following code to move files from one folder to another on the remote server: ssh username@server <<EOF cd source_dir find . -type f -name "*.txt" |xargs -n1000 -i{} mv {} dest_dir if then send mail indicating error otherwise echo "success" fi EOF ... (1 Reply)
Discussion started by: visingha
1 Replies

5. Shell Programming and Scripting

Move Command and exit status problem

Hi All, I am using the following code to move files from one folder to another on the remote server: ssh username@server <<EOF cd source_dir find . -type f -name "*.txt" |xargs -n1000 -i{} mv {} dest_dir if then send mail indicating error otherwise echo "success" fi EOF ... (10 Replies)
Discussion started by: visingha
10 Replies

6. Shell Programming and Scripting

command does not return exit status due to tee

Hi, I am using /bin/sh. I want to display the stdout and stderr on the terminal as well as save it in a file, so I'm using this command. gmake all 2>&1 | tee log But even if gmake fails, it's always giving 0 as exit status, i suppose because of tee. # false 2>&1 | tee Log # echo $? 0... (2 Replies)
Discussion started by: anand_bh
2 Replies

7. HP-UX

Logins command exit status is 236 not 0

I have noticed that on version 11.23 I get exit status 236 from the following command: logins -oxl root ; echo $? > 236 However on 11.31 I get the expected code 0 logins -oxl root ; echo $? > 0 The output is correct for both versions and contains no error data. Can anyone explain... (2 Replies)
Discussion started by: parkea2
2 Replies

8. Shell Programming and Scripting

Unable to find exit status of piped command

Lois_Answer_Code=`sipsak -vv -s sip:192.168.1.3|grep -A 1 "reply received after"|grep SIP|awk '{print $2}'`How to find the exit status of | (12 Replies)
Discussion started by: proactiveaditya
12 Replies

9. UNIX for Dummies Questions & Answers

Exit Status Of Find Command

Hello All, I am trying to capture the exit status of find command and want to delete the files only when it is successful. But it is always returning me as success even if the pattern of that file doesn't exist in the current directory. please help, checked manual page but couldn't able to figure... (6 Replies)
Discussion started by: Ariean
6 Replies

10. Shell Programming and Scripting

Exit Status of Command

Hi All, I am doing an export and import (datapump) of 4 schema. I know we can do an export of 4 schema in one command. But just want to know how to check the exit status if i do the export/import of 4 schema in different commands in background. Please suggest. Thanks, Mani (1 Reply)
Discussion started by: pvmanikandan
1 Replies
FS_WHEREIS(1)						       AFS Command Reference						     FS_WHEREIS(1)

NAME
       fs_whereis - Reports each file server housing a file or directory

SYNOPSIS
       fs whereis [-path <dir/file path>+] [-help]

       fs whe [-p <dir/file path>+] [-h]

DESCRIPTION
       The fs whereis command returns the name of each file server machine that houses the volume containing each directory or file named by the
       -path argument.

OPTIONS
       -path <dir/file path>+
	   Names each AFS file or directory for which to return the host file server machine. Partial pathnames are interpreted relative to the
	   current working directory, which is also the default value if this argument is omitted.

       -help
	   Prints the online help for this command. All other valid options are ignored.

OUTPUT
       The output includes a line for each specified directory or file. It names the file server machine on which the volume that houses the
       specified directory or file resides. A list of multiple machines indicates that the directory or file is in a replicated volume.

       Machine names usually have a suffix indicating their cell membership. If the cell is not clear, use the fs whichcell command to display the
       cell in which the directory or file resides. To display the cell membership of the local machine, use the fs wscell command.

EXAMPLES
       The following example indicates that volume housing the directory /afs/abc.com resides is replicated on both "fs1.abc.com" and
       "fs3.abc.com":

	  % fs whereis -path /afs/abc.com
	  File /afs/abc.com is on hosts fs1.abc.com fs3.abc.com

PRIVILEGE REQUIRED
       None

SEE ALSO
       fs_whichcell(1), fs_wscell(1)

COPYRIGHT
       IBM Corporation 2000. <http://www.ibm.com/> All Rights Reserved.

       This documentation is covered by the IBM Public License Version 1.0.  It was converted from HTML to POD by software written by Chas
       Williams and Russ Allbery, based on work by Alf Wachsmann and Elizabeth Cassell.

OpenAFS 							    2012-03-26							     FS_WHEREIS(1)
All times are GMT -4. The time now is 01:49 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy