![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | 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 |
| read file until certain line position | finalight | Shell Programming and Scripting | 5 | 05-21-2008 12:16 AM |
| Read value from particular position in file. | krishnarao | Shell Programming and Scripting | 2 | 05-15-2008 03:49 AM |
| read space filled file and replace text at specific position | COD | Shell Programming and Scripting | 6 | 04-21-2008 02:40 AM |
| How to read the configuration file from shell script | nishanth hampal | Shell Programming and Scripting | 7 | 02-26-2008 11:42 PM |
| Korn Shell Script - Read File & Search On Values | run_unx_novice | Shell Programming and Scripting | 2 | 06-15-2005 04:20 AM |
|
|
LinkBack | Thread Tools | Display Modes |
|
|||
|
The position i means is: for example.. inside the xxx file, it contain with: ---------------------------------------------------------------------- 1200120136420 1210324120 12145123 1200120136420 1210324120 22178210 ---------------------------------------------------------------------- position: 12345678901234567890123 4 Then i wanna grep or search for value in position 24 = 0. like that.. position is count space by space or character or alphanumeric length.. |
| Forum Sponsor | ||
|
|
|
|||
|
Quote:
I had try this : # item=10023 awk 'substr($0,24,1)=="$item" ' filename # but it cannot work. the system will take the $item as a string directly. |
|
||||
|
Quote:
Code:
while read file1line
do
while read file2line
do
echo "$file1line $file2line"
break 1
done < file2
done < file1
|