can a script return a value other than exit status

can a script return a value other than exit status

Post by Star Nigh » Wed, 29 Mar 2000 04:00:00



I trying to understand this line of code, is it possible  for a shell
script to return a value other than the exit status

OS=`${DIR}/conf`

What will the variable OS contain?

TFYT

Sent via Deja.com http://www.deja.com/
Before you buy.

 
 
 

can a script return a value other than exit status

Post by Barry Margoli » Wed, 29 Mar 2000 04:00:00




Quote:>I trying to understand this line of code, is it possible  for a shell
>script to return a value other than the exit status

>OS=`${DIR}/conf`

>What will the variable OS contain?

A command inside backticks is replaced by the stdout of the command.  So OS
will contain whatever that "conf" command normall prints out, with newlines
converted to spaces (if you enclose the backticked comman inside
doublequotes, this conversion won't take place).

--

GTE Internetworking, Powered by BBN, Burlington, MA
*** DON'T SEND TECHNICAL QUESTIONS DIRECTLY TO ME, post them to newsgroups.
Please DON'T copy followups to me -- I'll assume it wasn't posted to the group.

 
 
 

1. Bad value collect2: ld returned 1 exit status

Hello,

I post this message as a hint for all the people complaining about
this error

Bad value collect2: ld returned 1 exit status

and never got any answer (you can see LOTS of 1-message threads). I
also had it, it comes alone, no other complaint about headers or TOC
or symbols or whatever. -Wall or anything show no errors at all, ld
just fails and that's it.

My situation was: I copied by mistake on that Linux machine a Solaris
library ld used later for linking... so I would still call that a
problem of the linker which was obviously unable to figure out its
about another platform binary file, or at least give an understandable
error message. So guys check all your libraries to see if they are
really what they are supposed to be.

Best regards,
S

2. Empty dhcpd.leases file

3. Returning exit status to calling script

4. Locked keyboard

5. Get error when install open server: exit value 1 status:256

6. Question: command args using ps

7. ksh: if I trap on exit to rm tmp files, how do I save return value ?

8. Supervising non-child processes w/wo procfs

9. Capturing Exit Status values in csh?

10. Returning exit status

11. Exit return status > 127?

12. ersh - rsh frontend hack returning exit status of remote cmd

13. bad nfs status return value: 116