Re: [Networker] Formating of nsradmin output
2004-08-05 14:42:30
>
> Can anyone help me reformat this following output:
>
> type: NSR group;
> name: 0300W;
> comment: ;
> snapshot: False;
> autostart: Enabled;
> start time: "1:50";
> interval: "24:00";
> client retries: 1;
> clones: No;
> clone pool: Default Clone;
> migration clone pool: Migration Clone;
> printer: ;
> Snapshot Policy: Daily;
> Snapshot Pool: Default;
>
> Such that it reads as follows:
>
> type: NSR group; name: 0300W; comment: ; snapshot: False;
>
> I mean to put them in a contiguous line instead of every parameter reading
> in a separate line.
Do you only have one entry, or do you have multiple ones?
If you only have one, this is trivial..
perl -e 's/\n//; END { print "\n"; }' /your/file/here
If you can't stand the extra whitespace on the line...
perl -e 's/\n/ /; s/^\s*//; END { print "\n"; }' /your/file/here
sed/awk/tr solutions also possible, but I'm usually using perl when I'm
reformatting all sorts of networker output.
Can I ask if you're reformatting to feed back to networker, or into
something else?
--
Darren Dunham ddunham AT taos DOT com
Senior Technical Consultant TAOS http://www.taos.com/
Got some Dr Pepper? San Francisco, CA bay area
< This line left intentionally blank to confuse you. >
--
Note: To sign off this list, send a "signoff networker" command via email
to listserv AT listmail.temple DOT edu or visit the list's Web site at
http://listmail.temple.edu/archives/networker.html where you can
also view and post messages to the list.
=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=
|
|
|