Sponsored Content
Top Forums Shell Programming and Scripting Move Command and exit status problem Post 302235448 by visingha on Friday 12th of September 2008 02:18:12 AM
Old 09-12-2008
Hi Era,

Thanks for the reply.

As per your reply , should i use the following code to trace the execution of commands:

ssh username@server 'find source_dir -name "*.txt" | xargs -n 1000 -i {} mv {} destdir' 1>>$filename 2>>$filename &&
echo "Success" || mailx -s "fail" you@example.net

$filename is present on my local server , will the above code be able to trace the messages. Else please suggest the other variant of the code to track the exact error message.The log file should be present on the local server.

Thanks for your understanding
 

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. Shell Programming and Scripting

Problem with exit status

Hi, Consider the output of the following commands: case1) ------- # ifconfig -a | grep "UP" | grep uplink0:1 # echo $? Output is: 0 case2 ------ # ifconfig -a | grep "UP" | grep uplink0:1; echo $? Output is: 1 In case2 we got the exit code as 1, which is the actual exit code.... (1 Reply)
Discussion started by: diganta
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

Find exit status problem

Hi All Its strange or i am doing it wrong.When find run successful it return exit status 0.And same if it didn't run successfully it return zero. find /var/www/html -maxdepth 1 -type f -name *.dsadas echo $? 0 find /var/www/html -maxdepth 1 -type f -name *.php... (1 Reply)
Discussion started by: aliahsan81
1 Replies

6. Shell Programming and Scripting

problem in exit status of the command in a shell script-FTP

Hi All, I have developed below script for FTP a file from unix machine to another machine. ftpToABC () { USER='xyz' PASSWD='abc' echo "open xx.yy.zbx.aaa user $USER $PASSWD binary echo "put $1 abc.txt" >> /home/tmp/ftp.$$ echo "quit" >> /home/tmp/ftp.$$ ftp -ivn <... (3 Replies)
Discussion started by: RSC1985
3 Replies

7. UNIX for Advanced & Expert Users

Equivalents of tee command to find exit status of command

Hi, Want to log the output of command & check the exit status to find whether it succeeded or failed. > ls abc ls: abc: No such file or directory > echo $? 1 > ls abc 2>&1 | tee log ls: abc: No such file or directory > echo $? 0 Tee commands changes my exit status to be always... (7 Replies)
Discussion started by: vibhor_agarwali
7 Replies

8. HP-UX

[Solved] ssh debug1: Exit status 254 problem

Hello; Am experiencing odd problem with ssh: ========= ssh -vvv remote_host : : debug2: channel 0: rcvd adjust 65536 debug2: channel_input_status_confirm: type 99 id 0 debug2: shell request accepted on channel 0 debug1: client_input_channel_req: channel 0 rtype exit-status reply 0... (4 Replies)
Discussion started by: delphys
4 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
PIUS(1) 						      General Commands Manual							   PIUS(1)

NAME
pius - PGP Individual UID Signer SYNOPSIS
pius [options] -s <signer-keyid> <keyid> [<keyid> ...] pius [options] -A -r <keyring-path> -s <signer-keyid> DESCRIPTION
pius The PGP Individual UID Signer (PIUS) is a tool for individually signing all of the UIDs on a set of keys and encrypt-emailing each one to it's respective email address. This drastically reduces the time and errors involved in signing keys after a keysigning party. OPTIONS
--version show program's version number and exit -h or --help show this help message and exit -a or --use-agent Use pgp-agent instead of letting gpg prompt the user or every UID. [default: false] -A or --all-keys Sign all keys on the keyring. Requires -r. -b PATH or --gpg-path=PATH Path to gpg binary. [default: /usr/bin/gpg] -e or --encrypt-outfiles Encrypt output files with respective keys. -d or --debug Enable debugging output. -H HOSTNAME or --mail-host Hostname of SMTP server. [default: localhost] -i or --interactive Use the pexpect module for signing and drop to the gpg shell for entering the passphrase. [default: false] -I or --import Also import the unsigned keys from the keyring into the default keyring. Ignored if -r is not specified, or if it's the same as the default keyring. -m EMAIL or --mail Email the encrypted, signed keys to the respective email addresses. EMAIL is the address to send from. See also -H and -p. -M FILE or --mail-text Use the text in FILE as the body of email when sending out emails instead of the default text. To see the default text use --print- default-email. Requires -m. -n EMAIL or --override-email Rather than send to the user, send to this address. Mostly useful for debugging. -o OUTDIR or --out-dir Directory to put signed keys in. [default: /tmp/pius_out] -O or --no-pgp-mime Do not use PGP/Mime when sending email. -p or --cache-passphrase Cache private key passphrase in memory and provide it to gpg instead of letting gpg prompt the user for every UID. [default: true] -P PORT or --mail-port Port of SMTP server. [default: 25] -r KEYRING or --keyring The keyring to use. Be sure to specify full or relative path. Just a filename will cause GPG to assume relative to ~/.gnupg. [default: ~/.gnupg/pubring.gpg] -s SIGNER or --signer The keyid to sign with (required). -S or --mail-tls Use STARTTLS when talking to the SMTP server. -t TMP_DIR or --tmp-dir Directory to put temporary stuff in. [default: /tmp/pius_tmp] -T or --print-default-email Print the default email. -u USER or --mail-user Authenticate to the SMTP server, and use username USER. You will be prompted for the password. Implies -S. -v or --verbose Be more verbose. AUTHOR
PIUS was written by Phil Dibowitz <phil@ipom.com> This manual page was written by Luke Cycon <lcycon@gmail.com>, for the Debian project (but may be used by others). MARCH 2010 PIUS(1)
All times are GMT -4. The time now is 02:25 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy