![]() |
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | 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 !! |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| How to assign the result of a SQL command to more than one variable in shell script. | little_wonder | Shell Programming and Scripting | 4 | 05-06-2009 11:04 PM |
| Assign bash command to variable | Moxy | Shell Programming and Scripting | 3 | 04-29-2009 04:52 AM |
| assign awk command result to a variable | dedmakar | Shell Programming and Scripting | 9 | 01-24-2009 07:37 AM |
| assign subst|grep|sed command result to a variable | snowbiker99 | Shell Programming and Scripting | 5 | 11-14-2007 07:08 PM |
| assign value to variable using AWK | HAA | Shell Programming and Scripting | 4 | 12-06-2006 11:43 AM |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
Cut Command value assign to variable
Hi,
I am new to UNIX Scripting. I have been trying to use the CUT command to retrieve part of the header from a file and assign it to a variable. I have tried searching a lot, but I am still unsuccessful. Sample Header: HJAN BALANCE 20090616 I need to retrieve the date here, which always ranges from the 18-25 position. All I am trying to do is: echo "Header Line: $headerLine" headerDate = cut -c18-25 ${headerLine} Here $headerLine has a valid value. But the command doesnt work. Kindly assist. Thanks, Raghu |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|