![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Forum Rules | FAQ | Contribute | Members List | Arcade | 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 here. |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| read space filled file and replace text at specific position | COD | Shell Programming and Scripting | 6 | 04-21-2008 02:40 AM |
| check position of end of line(URGENT PLS) | evvander | Shell Programming and Scripting | 6 | 11-11-2007 02:46 PM |
| How to print at a specific position of the display | efernandes | Shell Programming and Scripting | 1 | 01-23-2007 05:08 PM |
| Print lines with search string at specific position | HealthyGuy | Shell Programming and Scripting | 4 | 12-04-2006 06:47 AM |
| How to add character in specific position of a string? | victorlung | Shell Programming and Scripting | 5 | 09-01-2006 07:33 AM |
|
|
Submit Tools | LinkBack | Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
check position of end of line for some specific lines
--------------------------------------------------------------------------------
Have to check in a file that the lines starting with 620 and 705 are ending at same posiotin. 82012345 62023232323 70523949558 62023255454 9999 In the above lines, i have to check the lines starting with 620 and 705 are having the length 94. Can anyone help. Immediate response is very much appriciated. |
| Forum Sponsor | ||
|
|
|
#2
|
|||
|
|||
|
awk
Hi,
code: Code:
awk ' ($0 ~ /^620/ || $0 ~ /^705/ ) && (length($0)==94)' a |
|||
| Google The UNIX and Linux Forums |