![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Forum Rules | FAQ | Contribute | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !! |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Development Releases: Linux Mint 4.0 Beta "Fluxbox", 4.0 Alpha "Debian" | iBot | UNIX and Linux RSS News | 0 | 01-04-2008 12:00 PM |
| grep to find content in between curly braces, "{" and "}," | keshav_rk | Shell Programming and Scripting | 4 | 08-09-2007 07:14 PM |
| how could i make a program mixed with many "|", "<" and ">" | strugglingman | High Level Programming | 2 | 04-29-2006 05:11 AM |
| No utpmx entry: you must exec "login" from lowest level "shell" | peterpan | UNIX for Dummies Questions & Answers | 0 | 01-18-2006 01:15 AM |
| how to request a "read" or "delivered" receipt for mails | plelie2 | Shell Programming and Scripting | 1 | 08-06-2002 12:26 PM |
|
|
Submit Tools | LinkBack | Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
Hi Friends,
Can any of you explain me about the below line of code? mn_code=`env|grep "..mn"|awk -F"=" '{print $2}'` Im not able to understand, what exactly it is doing Any help would be useful for me. Lokesha |
| Forum Sponsor | ||
|
|
|
#2
|
|||
|
|||
|
This will extract the lines having strings with "mn" at end
and print the first word after first "=" sign (which is the second column with = sign as column separator) example if ODBCHOME=/usr/damn/odbc is set in your .profile file then it will display /usr/damn/odbc |
|
#3
|
|||
|
|||
|
Thanks Karnan,
I've some more questions. Reqst you to answer these. 1) Why 'env' is used there? 2) This line of code is used in all the Control-M script, why they are searching for '..mn' (tow dot's). Thanks in advance, Lokesha |
|
#4
|
||||
|
||||
|
Correct me if Iam wrong.
env will shows the environmental variable values, and from that output grep is searching for '..mn'. With Regards, Ganapati |
|
#5
|
|||
|
|||
|
env has the common path or other setting used by the scripts
two dots represents minimum 2 letters before mn [..mn] |
|||
| Google The UNIX and Linux Forums |