Re: Get/find-question in script
From: Jan-Frode Myklebust (janfrode_at_PARALLAB.UIB.NO)
Date: 12/29/03
- Previous message: Harvey, Bruce T.: "Re: question about CPU Wait%"
- In reply to: brian welsh: "Get/find-question in script"
- Next in thread: Bill Thompson: "Re: Get/find-question in script"
- Reply: Bill Thompson: "Re: Get/find-question in script"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Mon, 29 Dec 2003 21:11:46 +0100 To: aix-l@Princeton.EDU
On Mon, Dec 29, 2003 at 08:29:37PM +0100, brian welsh wrote:
>
> If I run the following command, I receive the following output:
> $ lscfg -vl rmt1 | grep Serial | awk '{print $2}'
> Number...............000000057149
>
> Can anyone give me a hint which command to use if I only want to have:
> 000000097418
Substitute the dots with spaces and print $3:
% lscfg -vl rmt1 | grep Serial | sed 's/\./ /g'|awk '{print $3}'
6811092091
> or
> 97418
Feed the number to 'bc':
% lscfg -vl rmt1 | grep Serial | sed 's/\./ /g'|awk '{print $3}' | bc
6811092091
Ooops, my serial didn't contain any leading zeros...
% echo 000000097418 | bc
97418
-jf
- Previous message: Harvey, Bruce T.: "Re: question about CPU Wait%"
- In reply to: brian welsh: "Get/find-question in script"
- Next in thread: Bill Thompson: "Re: Get/find-question in script"
- Reply: Bill Thompson: "Re: Get/find-question in script"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
- Re: Reinstall IE6 in W2000
... Tom Gunby ... I am unable to pursue your "hint" at the moment as I am
working from home ... clarify what I am trying to "find before and after the above command".
... Robert Aldwinckle ... (microsoft.public.windows.inetexplorer.ie6.setup) - Re: [patch 3/3] clockevents: Fix resume logic - updated version
... good hint what we need to look at. ... No joy, sorry. ... It still
hangs at the last statement in acpi_evaluate_object. ... Can you add "nolapic_timer" to
the command line please? ... (Linux-Kernel) - Re: Input from subprocess called using open() buffered?
... I am a bit baffled as to why I need to have COMMAND as a filehandle - is there ...
Presumably all the output is going to $pty, so I don't even need COMMAND, or do I? ...
perl thing, didn't realise other programs actually did different things ... >>Failing
that, I Expect (hint, hint) there's something on CPAN you ... (comp.lang.perl.misc) - uvscan
... Does anyone know or can give me a hint about this command line scanner.
... I`ve red the manual page but i still got trouble in starting this virusscanner. ...
(freebsd-questions) - Re: help: setting gnome terminal font size
... hint #2 click on the title bar's help region pull down to "about". ...
hint #3 most icons have properties. ... look for the line with "Command:" on it.
... (Fedora)