![]() |
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Assigning multiple values to a variable | unx100 | Shell Programming and Scripting | 4 | 07-16-2009 12:33 PM |
| Multiple variable in a variable in Perl | Raynon | Shell Programming and Scripting | 3 | 05-04-2009 11:10 PM |
| Testing for multiple words in a Variable | eltinator | UNIX for Dummies Questions & Answers | 1 | 02-17-2009 05:17 AM |
| How do I write multiple variable syntax? | Captain | Shell Programming and Scripting | 1 | 11-11-2008 04:46 PM |
| usage of same variable in multiple scripts | risshanth | UNIX for Dummies Questions & Answers | 1 | 07-01-2008 01:03 PM |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
multiple variable question
This is the control File (snmplist.fl1) .1.3.6.1.4.1.789.1.5.4.1.2.3 = STRING: "/vol/vol0/" .1.3.6.1.4.1.789.1.5.4.1.2.5 = STRING: "/vol/SMP_sapdata/" .1.3.6.1.4.1.789.1.5.4.1.2.7 = STRING: "/vol/SMP_saplog/" .1.3.6.1.4.1.789.1.5.4.1.2.9 = STRING: "/vol/SRP_saplog/" .1.3.6.1.4.1.789.1.5.4.1.2.11 = STRING: "/vol/SRP_sapdata/" Code:
while read line; do VOL=`awk 'BEGIN { FS="[. ]" } {print $14}' snmplist.fl1`; OID=`awk 'BEGIN { FS="[. ]" } {print $17}' snmplist.fl1`; echo echo -e "<31>\n active = 1\n name = DF Percent Free $VOL \n oid = .1.3.6.1.4.1.789.1.5.4.1.6.$OID\n thr = 10\n oper =>=\n sev = 4\n strnum = 0\n</31>" ; done < snmplist.fl1
trying to get the last octet of each snmp line, and the "Vol Name" and echo those two peices of data into a new line via the echo command not happening, would appreciate a hand, thanx Last edited by riegersteve; 10-01-2009 at 04:23 AM.. |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|