Re: bash question.

2012-04-13 Thread Hendrik Brueckner
Hi John, On Thu, Apr 12, 2012 at 10:42:33PM -0500, John McKown wrote: bash has variables, such as $PATH and $HOME and maybe even $i. If a variable has been the subject of an export command, you find all of them which are export'd using the printenv command. But is there some way to find the

Re: bash question.

2012-04-13 Thread McKown, John
of TennesseeSM and The MEGA Life and Health Insurance Company.SM -Original Message- From: Linux on 390 Port [mailto:LINUX-390@VM.MARIST.EDU] On Behalf Of Mark Post Sent: Thursday, April 12, 2012 10:48 PM To: LINUX-390@VM.MARIST.EDU Subject: Re: bash question. On 4/12/2012 at 11:42 PM, John

Re: bash question.

2012-04-13 Thread McKown, John
Brueckner Sent: Friday, April 13, 2012 3:47 AM To: LINUX-390@VM.MARIST.EDU Subject: Re: bash question. Hi John, On Thu, Apr 12, 2012 at 10:42:33PM -0500, John McKown wrote: bash has variables, such as $PATH and $HOME and maybe even $i. If a variable has been the subject of an export

Re: bash question.

2012-04-13 Thread Malcolm Beattie
McKown, John writes: Very nice! Thanks. I guess that I'm going to end up dedicating a weekend day to just read the entire output from info bash. Luckily, I can create a text file from it, convert it to PDF format, then read the PDF directly on my Kindle DX or Android tablet. In case you

Re: bash question.

2012-04-13 Thread McKown, John
: Friday, April 13, 2012 11:01 AM To: LINUX-390@VM.MARIST.EDU Subject: Re: bash question. snip In case you weren't aware of it already, the utilities used to process the *roff macros used in man pages support typesetting to PostScript as well as generating simple text output. So typing man -t

bash question.

2012-04-12 Thread John McKown
bash has variables, such as $PATH and $HOME and maybe even $i. If a variable has been the subject of an export command, you find all of them which are export'd using the printenv command. But is there some way to find the ones which exist, but have not been export'd? No, I guess I don't have a

Re: bash question.

2012-04-12 Thread Mark Post
On 4/12/2012 at 11:42 PM, John McKown joa...@swbell.net wrote: bash has variables, such as $PATH and $HOME and maybe even $i. If a variable has been the subject of an export command, you find all of them which are export'd using the printenv command. But is there some way to find the ones

BASH question - may even be advanced - pipe stdout to 2 or more processes.

2011-02-09 Thread McKown, John
Yeah, it sound weird. What I have is 72 files containing a lot of secuity data from our z/OS RACF system. To save space, all these files are bzip2'ed - each individually. I am writing some Perl scripts to process this data. The Perl script basically reformats the data in such a way that I can

Re: BASH question - may even be advanced - pipe stdout to 2 or more processes.

2011-02-09 Thread Larry Ploetz
If you have a new enough bash, you can: bzcat data*bz2 | tee (process1) (process2) (process3) ... | processn but the stdout from process1..n get intermixed unless redirected to files. (Tom Meyer taught me that!) - Larry On 2/9/11 12:19 PM, McKown, John wrote: Yeah, it sound weird. What I

Re: BASH question - may even be advanced - pipe stdout to 2 or more processes.

2011-02-09 Thread McKown, John
...@stanford.edu] Sent: Wednesday, February 09, 2011 2:31 PM To: Linux on 390 Port Cc: McKown, John Subject: Re: BASH question - may even be advanced - pipe stdout to 2 or more processes. If you have a new enough bash, you can: bzcat data*bz2 | tee (process1) (process2) (process3

Re: BASH question - may even be advanced - pipe stdout to 2 or more processes.

2011-02-09 Thread Larry Ploetz
On 2/9/11 12:40 PM, McKown, John wrote: tee can output to multiple files? The man page implies only a single file. Hmmm...maybe you need a new enough tee also: SYNOPSIS tee [OPTION]... [FILE]... DESCRIPTION Copy standard input to each FILE, and also to standard output. So I

Re: BASH question - may even be advanced - pipe stdout to 2 or more processes.

2011-02-09 Thread Edmund R. MacKenty
On Wednesday, February 09, 2011 03:19:03 pm you wrote: Yeah, it sound weird. What I have is 72 files containing a lot of secuity data from our z/OS RACF system. To save space, all these files are bzip2'ed - each individually. I am writing some Perl scripts to process this data. The Perl script

Re: BASH question - may even be advanced - pipe stdout to 2 or more processes.

2011-02-09 Thread McKown, John
: Linux on 390 Port [mailto:LINUX-390@VM.MARIST.EDU] On Behalf Of Larry Ploetz Sent: Wednesday, February 09, 2011 2:48 PM To: LINUX-390@VM.MARIST.EDU Subject: Re: BASH question - may even be advanced - pipe stdout to 2 or more processes. On 2/9/11 12:40 PM, McKown, John wrote: tee can output

Re: BASH question - may even be advanced - pipe stdout to 2 or more processes.

2011-02-09 Thread Edmund R. MacKenty
On Wednesday, February 09, 2011 03:47:38 pm you wrote: On 2/9/11 12:40 PM, McKown, John wrote: tee can output to multiple files? The man page implies only a single file. Hmmm...maybe you need a new enough tee also: SYNOPSIS tee [OPTION]... [FILE]... DESCRIPTION Copy

Re: BASH question - may even be advanced - pipe stdout to 2 or more processes.

2011-02-09 Thread Larry Ploetz
On 2/9/11 1:08 PM, Edmund R. MacKenty wrote: Doh! I should have remembered that. So the functions I wrote could have been implemented as: Ntee() { tee $@ /dev/null } Just goes to show that there's usually several ways to do anything in Linux. I focused on doing it entirely in bash.

Re: bash question.

2009-01-11 Thread John Summerfield
John McKown wrote: Is there any better way, in a bash script, to pipe both stdout and stderr from an application other than using a subshell? So far the only way that I've thought of to do it is: (command parm1 ... 21) | othercommand The parentheses don't do anything useful. Here, stderr is

bash question.

2009-01-08 Thread John McKown
Is there any better way, in a bash script, to pipe both stdout and stderr from an application other than using a subshell? So far the only way that I've thought of to do it is: (command parm1 ... 21) | othercommand -- Q: What do theoretical physicists drink beer from? A: Ein Stein. Maranatha!

Re: bash question.

2009-01-08 Thread Mark Post
On 1/8/2009 at 12:36 PM, John McKown joa...@swbell.net wrote: Is there any better way, in a bash script, to pipe both stdout and stderr from an application other than using a subshell? So far the only way that I've thought of to do it is: (command parm1 ... 21) | othercommand Just:

Re: bash question.

2009-01-08 Thread John McKown
On Thu, 8 Jan 2009, Mark Post wrote: On 1/8/2009 at 12:36 PM, John McKown joa...@swbell.net wrote: Is there any better way, in a bash script, to pipe both stdout and stderr from an application other than using a subshell? So far the only way that I've thought of to do it is: (command

Re: bash question.

2009-01-08 Thread Edmund R. MacKenty
On Thursday 08 January 2009 14:13, John McKown wrote: Well, shoot. That never even occurred to me. What I thought that would do was: Change stderr to go where stdout currently goes, then change stdout to go into the pipe. I based this on the fact that if I do: command 21 1x.tmp Then stderr

Re: bash question.

2009-01-08 Thread Erik N Johnson
Thus, if you want the behaviour you described in the above command, you could do the following: command parms 21 | cat file.tmp which would put everything in the file file.tmp Erik Johnson On Thu, Jan 8, 2009 at 1:30 PM, Edmund R. MacKenty ed.macke...@rocketsoftware.com wrote: On Thursday 08

Re: bash question.

2009-01-08 Thread Larry Ploetz
On 1/8/09 9:36 AM, John McKown wrote: Is there any better way, in a bash script, to pipe both stdout and stderr from an application other than using a subshell? So far the only way that I've thought of to do it is: (command parm1 ... 21) | othercommand Others have answered the question, but

Re: bash question.

2009-01-08 Thread John McKown
On Thu, 8 Jan 2009, Edmund R. MacKenty wrote: On Thursday 08 January 2009 14:13, John McKown wrote: Well, shoot. That never even occurred to me. What I thought that would do was: Change stderr to go where stdout currently goes, then change stdout to go into the pipe. I based this on the