Re: no stdin so how do I pass variables instead?
From: Faeandar (mr_castalot_at_yahoo.com)
Date: 12/23/04
- Next message: Prince: "remove last and first three lines from a file"
- Previous message: Kenny McCormack: "Re: yesterday date"
- In reply to: Kevin Collins: "Re: no stdin so how do I pass variables instead?"
- Next in thread: Kevin Collins: "Re: no stdin so how do I pass variables instead?"
- Reply: Kevin Collins: "Re: no stdin so how do I pass variables instead?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Wed, 22 Dec 2004 23:08:10 GMT
Fair enough, I'd doubt my "pipeline of transformation" too were I you...
source:/vol/vol9/qtree1
dest:/vol/vol9_source/source_vol9_qtree1 Source
17:57:35 Idle
Technically that's all one line, just wrapped poorly. I grabbed the line
and checked it in vi, it seems the whitespace is spaces not tabs. The
fields are:
source and path; destination and path; identifier as source or dest; lag
time; status
For the main volsv script to work for the above it has to have input as:
source:vol9 dest:vol9_source
Hence my pipeline.
Removing the quotes from the field args doesn't seem to effect it.
~F
Kevin Collins wrote:
> In article <cusjs0h5s4o7mfbmblh605aml6ubsutlge@4ax.com>, Faeandar wrote:
>
>>On Wed, 22 Dec 2004 09:52:20 -0600, Ed Morton <morton@lsupcaemnt.com>
>>wrote:
>>
>>
>>
>>>Yes, a while loop. Something like this is what we'll probably end up
>>>with but you need to provide the output of the "printf"s between the rsh
>>>and the $vsolv I asked for earlier or otherwise tell us how the 2 fields
>>>are separated (e.g. single-space?) since you say there can be tabs in
>>>the output. You also need to verify that this type of loop fits your
>>>expectations (i.e. that $volsv may get called many times for each X).
>>>
>>>for X in $source_list
>>>do
>>> fields=`rsh $X snapvault status | tail +3 |
>>> sed 's/ */\//g' | awk -F"/" '{print $1$3,$5$7}' | uniq`
>>> echo "$fields" | while read field1 field2
>>> do
>>> $volsv -q -u -test "$field1" "$field2" >> $volsv_out
>>> done
>>>done
>>
>>
>>Ok, I'm trying to work this out with my minimal skill so bear with me
>>(as you already have, thanks).
>>
>>The request for printf I did not understand, and honestly still don't,
>>but I will get that next (not understanding as in how to do it, not
>>why). The output will not have tabs, it's the *input* that may have
>>tabs but I'll verify that as well.
>>
>>I tried the above method as well as the one from Kevin. Above got
>>nowhere as it still took the entire set as one field, I assume the
>>printf's will show why and I'll get there shortly. The method from
>>Kevin had some success in that it took one set and ran it correctly
>>but skipped the other sets.
>>
>>Working on the printf now.
>
>
> Ok, can you show us the output of:
>
> rsh $X snapvault status
>
> I really would prefer to see what I am working with than this pipeline of
> transformation (that may not be needed).
>
> Additionally, what happens if you remove quotes from around your args like
> this?
>
> $volsv -q -u -test "$field1" "$field2" >> $volsv_out
>
> Kevin
- Next message: Prince: "remove last and first three lines from a file"
- Previous message: Kenny McCormack: "Re: yesterday date"
- In reply to: Kevin Collins: "Re: no stdin so how do I pass variables instead?"
- Next in thread: Kevin Collins: "Re: no stdin so how do I pass variables instead?"
- Reply: Kevin Collins: "Re: no stdin so how do I pass variables instead?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|