Re: Get/find-question in script
From: Wood, Paul (PCWood_at_INGDIRECT.COM)
Date: 12/29/03
- Previous message: Jan-Frode Myklebust: "Re: Get/find-question in script"
- Maybe in reply to: brian welsh: "Get/find-question in script"
- Next in thread: Bill Thompson: "Re: Get/find-question in script"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Mon, 29 Dec 2003 15:18:33 -0500 To: aix-l@Princeton.EDU
$ lscfg -vl rmt1 | grep Serial | awk -F. '{print $NF}'
745S0077
-F. (split on ".")
$NF = Number of Fields
Happy Holidays!
-PCWOOD
-----Original Message-----
From: brian welsh [mailto:brianwelsh3@HOTMAIL.COM]
Sent: Monday, December 29, 2003 2:30 PM
To: aix-l@Princeton.EDU
Subject: Get/find-question in script
Hello,
If I give the next command, I receive the following output:
$ lscfg -vl rmt1
rmt1 U0.1-P2-I2/Q1-W3000000089756EC4-L1100000000000 IBM
3590
Tape Drive and Medium Changer (FCP)
Manufacturer................IBM
Machine Type and Model......03590H1A
Serial Number...............000000097418
Device Specific.(FW)........F29C
Loadable Microcode Level....A0B00E26
If I run the following command, I receive the following output:
$ lscfg -vl rmt1 | grep Serial
Serial Number...............000000057149
Now I only need the Serial Number, the digits, not the text 'Serial
Number'
and the dots, so only 000000097418
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
or
97418
Thanx in advance...
Brian
_________________________________________________________________
MSN Zoeken helpt je om de gekste dingen te vinden! http://search.msn.nl
This email may contain confidential or privileged information. If you believe you have received the message in error, please notify the sender and delete the message without copying or disclosing it.
- Previous message: Jan-Frode Myklebust: "Re: Get/find-question in script"
- Maybe in reply to: brian welsh: "Get/find-question in script"
- Next in thread: Bill Thompson: "Re: Get/find-question in script"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
- Re: Problems trying to configure Linux laptop to print to Windows XP shared printer
... map to guest = Never ... check password script = ... enumports
command = ... ldap delete dn = No ... (comp.os.linux.setup) - Problems trying to configure Linux laptop to print to Windows XP shared printer
... map to guest = Never ... check password script = ... enumports
command = ... ldap delete dn = No ... (comp.os.linux.setup) - Re: MATLAB Code for a stop process button which ex
... especially in the while loop(for each script command starting in the ... % varargin
command line arguments to stop_button ... % line_num is the order of execution. ...
msgno = msgno+1; ... (comp.soft-sys.matlab) - Re: smb service fails to start in FC5
... here's the output from the testparm -v command: ... map to guest = Never
... check password script = ... ldap delete dn = No ... (Fedora) - Re: Why doesnt foreach return a value
... say that Tcl evaluation does not return to the script if an ... They return
an EMPTY value. ... of the command) as the name of a command, that we happen to
have just ... It invokes the expression evaluator to handle the ... (comp.lang.tcl)