Sponsored Content
Top Forums Shell Programming and Scripting Passing error message back to script Post 302662731 by Lem on Wednesday 27th of June 2012 04:41:21 AM
Old 06-27-2012
May be with command substitution.

Hint:
Code:
lem@biggy:/tmp$ cat file1
#!/bin/sh
false || echo "problem"
exit 0

lem@biggy:/tmp$ cat file2
#!/bin/sh
echo first
echo $(/tmp/file1)
echo last
exit 0

lem@biggy:/tmp$ ./file2
first
problem
last
lem@biggy:/tmp$

This User Gave Thanks to Lem For This Post:
 

10 More Discussions You Might Find Interesting

1. Programming

how to passing message along pipes??

Dear All, Would you tell me how I can passing a message along pipes? I have built a token ring connected with pipes, but I don't know how to pass the message along it through the command line... Thx. Yours, i- (1 Reply)
Discussion started by: iminus
1 Replies

2. Programming

Passing Parameters and getting values back from a c program to Shell script

I am having a shell script which has to be called from a C program. I have to pass two parameters to this script. HOw can I do that? eg: int main() { char st1; char str2; // call a shell script call_sh(str1,str2) where call_sh is the name of the shell script. then i need to get the return... (5 Replies)
Discussion started by: Rajeshsu
5 Replies

3. Shell Programming and Scripting

passing oracle parameters back to Shell

Hi All, Does anyone have any solutions for passing back multiple variables back to the SHELL from a call to an ORACLE procedure: eg #username='scott' #password='tiger' #database='orcl' username='ITGCD03D03' password='tC5epIew' database='ITGCD03D' sqlplus -s... (4 Replies)
Discussion started by: satnamx
4 Replies

4. Linux Benchmarks

What are the benchmark programs for Message passing?

Is there any benchmark programs for Message Passing like SPLASH-2 for Shared Memory. (0 Replies)
Discussion started by: gkreddy
0 Replies

5. UNIX for Advanced & Expert Users

Message passing to kerenel

i want to add a system call(successfuly added) and pass the message(which contains int and a string) /*code i used my program calling system call printmsg*/ message mm; mm.m1_i1=10; mm.m1_p1="hello"; printmsg(&mm); /*user library*/ printmsg(*m1) { printf("integer... (1 Reply)
Discussion started by: kathir_dz
1 Replies

6. Shell Programming and Scripting

Passing a variable from a child script back to the parent

Hi I have written a script using ftp to get files from one server and copy them to 2 dirrerent servers. I wish to call this script from a parent script that will check the number of files copied and run a check sum for each file. As the filenames for the files in the get portion of the script... (3 Replies)
Discussion started by: Andy82
3 Replies

7. Shell Programming and Scripting

Passing variable to Expression in back ticks.

Hi, In my perl script I want to check whether *.csv files exist and take the count . Below is the code: $path = “/home/usr/jan/myfiles” my $File_Count = `ls *.csv | wc -l `; # Checks in the current directory #Works fine if files exists. my $File_Count = `ls $path/*.csv | wc -l `; # I need... (2 Replies)
Discussion started by: jisha
2 Replies

8. Solaris

Message passing toolkit

Hello, Has somebody download it before oracle deleted from support section? I tried dl it from: oracle.com/us/products/tools/message-passing-toolkit-070499.html Oracle Message Passing Toolkit but: section decommissioned. Same in support and edelivery I phoned to oracle support and... (2 Replies)
Discussion started by: time0ut
2 Replies

9. Solaris

Mail loops back to me error in /var/adm/message after patching

Hi, I am getting the below messsage in /var/adm/message after patching but sendmail is working after restoring the backup file. sendmail: q4G7U1Cj014774: SYSERR(root): 127.0.0.1 config error: mail loops back to me (MX problem?) sendmail: q4G801cw025824: SYSERR(root): 127.0.0.1 config... (3 Replies)
Discussion started by: fayaz
3 Replies

10. Shell Programming and Scripting

Passing control back to the shell script

Hi All, I have a shell script(test_abc.sh) with the following shell commands, which are invoking the same shell script with different parameters. test_abc.sh . ./test.sh abc >> test.log . ./test.sh xyz >> test.log . ./test.sh pys >> test.log . ./test.sh abc >> test.log . . ... (4 Replies)
Discussion started by: dev.devil.1983
4 Replies
ZDIFF(1)						    BSD General Commands Manual 						  ZDIFF(1)

NAME
zcmp, zdiff -- compare compressed files SYNOPSIS
zcmp [options] file [file2] zdiff [options] file [file2] DESCRIPTION
zcmp and zdiff are filters that invoke cmp(1) or diff(1) respectively to compare compressed files. Any options that are specified are passed to cmp(1) or diff(1). If only file1 is specified, it is compared against a file with the same name, but with the extension removed. When both file1 or file2 are specified, either file may be compressed. Extensions handled by gzip(1): o z, Z, o gz, o taz, o tgz. Extensions handled by bzip2(1): o bz, o bz2, o tbz, o tbz2. Extensions handled by xz(1): o lzma, o xz, o tlz, o txz. ENVIRONMENT
TMPDIR Directory in which to place temporary files. If unset, /tmp is used. FILES
/tmp/zcmp.XXXXXXXXXX Temporary file for zcmp. /tmp/zdiff.XXXXXXXXXX Temporary file for zdiff. SEE ALSO
bzip2(1), cmp(1), diff(1), gzip(1), xz(1) CAVEATS
zcmp and zdiff rely solely on the file extension to determine what is, or is not, a compressed file. Consequently, the following are not supported as arguments: - directories - device special files - filenames indicating the standard input (``-'') BSD
May 23, 2011 BSD
All times are GMT -4. The time now is 09:28 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy