Re: passing arguments within pipes
- From: "Janis" <janis_papanagnou@xxxxxxxxxxx>
- Date: 10 Apr 2007 03:09:54 -0700
On 10 Apr., 01:53, Seb <splu...@xxxxxxxxx> wrote:
On Mon, 9 Apr 2007 23:42:32 +0000 (UTC),
pac...@xxxxxxxxxxxx (Alan Curry) wrote:
In article <87d52dceik....@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx>,
Seb <splu...@xxxxxxxxx> wrote:
some_file=$(ls | gawk 'FNR == 1')
fun ${curfile} 1 6some_file and curfile are the same thing I guess. You can combine those
and eliminate the middle-man:
Oh my, those two were meant to be the same (sorry, I'm juggling between
the actual script and comp.unix.shell too fast). I get it, there's no way
to parse the output from a pipe into a particular argument of a function
on the right side of a pipe.
You can do that, too, if you don't line command substitution. See my
xargs example upthread. On my system (using -I to define the
placeholder)...
ls | xgawk 'NR == 3' | xargs -I{} fun {} 1 6
Janis
Thank you both for putting me on track.
Cheers,
--
Seb
.
- References:
- passing arguments within pipes
- From: Seb
- Re: passing arguments within pipes
- From: Janis Papanagnou
- Re: passing arguments within pipes
- From: Seb
- Re: passing arguments within pipes
- From: Seb
- passing arguments within pipes
- Prev by Date: Re: Using Bash to get the last line of a file
- Next by Date: Re: Scheduled AT bash script only works if user is logged on?
- Previous by thread: Re: passing arguments within pipes
- Next by thread: Re: passing arguments within pipes
- Index(es):
Relevant Pages
|