Specialty Forums
Security and Virus
General Hardware
CPUs/Overclocking
Networking
Digital Photo/Video
Office Software
PC Gaming
Console Gaming
Programming
Database
Web Development
Digital Home

General Forums
Windows XP
Windows Vista
Windows 95/98
Windows Me
Windows NT
Windows 2000
Win Server 2008
Win Server 2003
Windows 3.1
Linux
PDAs
BeOS
Novell Netware
OpenVMS
Solaris
Disk Op. System
Unix
Mac
OS/2

Drivers
Driver Scan
Driver Forum

Software
Automatic Updates

BIOS Updates

My Computing.Net

Solution Center

Free IT eBook

Howtos

Site Search

Message Find

RSS Feeds

Install Guides

Data Recovery

About

Home
Reply to Message Icon Go to Main Page Icon

Subject: how to extract command fields??

Original Message
Name: wistler
Date: January 23, 2008 at 04:04:04 Pacific
Subject: how to extract command fields??
OS: a
CPU/Ram: a
Model/Manufacturer: a
Comment:
hi,

i am new to this...i need to find a method to extract or display only certain fields

for eg: show network gives the fields like product, node and address....

how can i get only the address??

thx


Report Offensive Message For Removal

Response Number 1
Name: HakZan
Date: January 23, 2008 at 06:01:10 Pacific
Subject: how to extract command fields??
Reply: (edit)
As noticed in my earlier reply, I'm using lexical functions to get the information needed.

A lexical function is no a command, it is a subprogram that you can use.

$ HELP LEXICALS

STR = "This is just a textstring"

I can look at the string "str" as a textstring or as a list of words separated by a space.

A = f$extract(8,4,str)

I extract 4 characters starting at character 8 from the string represented by the symbol "str".
A = "just"


or

A = f$element(2," ",str)

I get the second element in the list (str) with delimiter " ".

There are a lot of examples in the HELP-utility. Let the lexicals be your best friends.

regards,

Hakan Zanderau
HA-solutions


Report Offensive Follow Up For Removal

Response Number 2
Name: HakZan
Date: January 23, 2008 at 06:03:44 Pacific
Subject: how to extract command fields??
Reply: (edit)
Ooooops,....

f$element starts at element 0.....
f$element(2," ",str) will extract the third word


Report Offensive Follow Up For Removal

Response Number 3
Name: wistler
Date: January 23, 2008 at 09:43:16 Pacific
Subject: how to extract command fields??
Reply: (edit)
isint this complicated to extract fields from output which are all across the screen....is there a easier way to extract the fields like the cut or awk we use in unix

Report Offensive Follow Up For Removal

Response Number 4
Name: HakZan
Date: January 23, 2008 at 11:26:44 Pacific
Subject: how to extract command fields??
Reply: (edit)
I'm not a frequent UNIX-user so I don't know how "awk" or "cut" work..........

Please explain more about your problem.

regards,

Hakan Zanderau
HA-solutions


Report Offensive Follow Up For Removal

Response Number 5
Name: SKStewart
Date: January 25, 2008 at 07:04:42 Pacific
Subject: how to extract command fields??
Reply: (edit)
Gawk and Perl for OpenVMS are listed on the official freeware page. Go to www.hp.com/go/openvms and look for the "OpenVMS Resources column".

Hakan makes an important point about learning the lexical functions. In OpenVMS, parsing a command output for information is usually a last-ditch approach. I always look for logical name or a lexical function that gives the information I want. (That said, I haven't found a good one for DECnet address!)


Report Offensive Follow Up For Removal



Use following form to reply to current message:

   Name: From My Computing.Net Settings
 E-Mail: From My Computing.Net Settings

Subject: how to extract command fields??

Comments:

 
  Homepage URL (*): 
Homepage Title (*): 
         Image URL: 
 


Data Recovery Software



Version Tracker Pro
Keep your software current and secure, effortlessly

Click Here for a Free Scan

Driver Agent
Automatically find the latest drivers for your computer.
Click Here for a Free Scan



The information on Computing.Net is the opinions of its users. Such opinions may not be accurate and they are to be used at your own risk. Computing.Net cannot verify the validity of the statements made on this site. Computing.Net and Computing.Net, LLC hereby disclaim all responsibility and liability for the content of Computing.Net and its accuracy.
PLEASE READ THE FULL DISCLAIMER AND LEGAL TERMS BY CLICKING HERE

All content ©1996-2007 Computing.Net, LLC