![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
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 |
| Storing commands in $variables. | Paulw0t | Shell Programming and Scripting | 7 | 08-08-2008 05:42 PM |
| Storing data of files | Fr0z3n999 | UNIX for Dummies Questions & Answers | 1 | 12-09-2006 09:47 PM |
| first row data into variables | u263066 | Shell Programming and Scripting | 1 | 08-14-2006 07:54 AM |
| Splitting data file | ctcuser | Shell Programming and Scripting | 4 | 01-08-2005 09:04 AM |
| awk - storing data in variables | 2nilotpal | Shell Programming and Scripting | 7 | 04-16-2004 05:32 AM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
Hi,
I have a file in the given format: |aaa |hhh |fat hat chat |make sure I need to get store in a variable,say 'error' the value of the string 'fat hat chat' In short, echo $error should give the result fat hat chat Is this possible using awk? Also, can this be split.For example, I have to store the value of the string (fat hat chat) in to two variables.Say, error1 and error2 (Given field width is predefined) i.e error1=fat ha error2=h chat Thanks in advance Js |
|
||||
|
Quote:
Can any one tell me the solution for the same question when the given file has fields not separated by the | ??? Thanks in advance Js |
|
||||
|
hi there! (i'm at SunOS 5.9)
i'm trying to split a string with *split*, but i can't. for example: in shell i do: $ string='hi go bye' $ then i try: awk 'split($string, strings, " ")' (and a get the following) $ awk: syntax error near line 1 $ awk: illegal statement near line 1 i've tried a lot of choices, with files and more, and i can't get what's going on. how can i make it work? |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|