![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Forum Rules | FAQ | Contribute | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| AIX AIX is IBM's industry-leading UNIX operating system that meets the demands of applications that businesses rely upon in today's marketplace. |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| how to attach a variable from the 2nd file to the 1st file | lo tan | Shell Programming and Scripting | 5 | 06-02-2008 11:58 PM |
| print variable in file using awk | kamel.seg | Shell Programming and Scripting | 3 | 01-03-2008 03:43 AM |
| Using a variable in File Path | sandeep_hi | Shell Programming and Scripting | 2 | 06-20-2006 04:12 AM |
| awk variable assignment in a file | pondlife | Shell Programming and Scripting | 4 | 01-12-2006 01:54 AM |
| lines from file to variable | iCONAN | Shell Programming and Scripting | 4 | 09-16-2004 05:10 AM |
|
|
Submit Tools | LinkBack | Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
Put one ligne from a file a variable
Hi everybody
I looking the put the result of a commane to a Variable i explain here is my command: FJTS_UK:root:common@ukaix3:/> cat sortie | grep "^[1-9999]"| awk '{ print $1}' 15 FJTS_UK:root:common@ukaix3:/> sortie is a texte file I want to put the result of commande in a variable X and the end i would like echo $X 15 I hope you understand what i want to do, sorry for my english I m french |
| Forum Sponsor | ||
|
|
|
#2
|
||||
|
||||
|
Try...
Code:
X=$(awk '/^[1-9]/{print $1}' sortie)
|
||||
| Google The UNIX and Linux Forums |