![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Forum 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 |
| awk, ignore first x number of lines. | trey85stang | Shell Programming and Scripting | 8 | 05-21-2008 01:44 AM |
| Print the first four characters of hostname | yxian | Shell Programming and Scripting | 4 | 10-22-2007 08:54 AM |
| Print the characters in a word | chella | Shell Programming and Scripting | 5 | 10-17-2007 06:06 AM |
| to print number one less than actual number | cdfd123 | Shell Programming and Scripting | 4 | 09-06-2007 03:56 AM |
| AIX cannot print thai characters | ivanwee | AIX | 0 | 10-18-2006 12:13 AM |
|
|
Submit Tools | LinkBack | Thread Tools | Display Modes |
|
#1
|
|||
|
|||
|
say
D45H E67H G779K F8888U T66Y Y333U output shud be like 45 67 779 8888 66 333 |
| Forum Sponsor | ||
|
|
|
#2
|
||||
|
||||
|
Quote:
Code:
tr -d '[:alpha:]' < file.txt |
|
#3
|
||||
|
||||
|
Put all the lines in a file (say file.txt) and then:
Code:
sed "s/[^0-9]//g" file.txt or without file: echo "D45H" | sed "s/[^0-9]//g" |
|
#4
|
|||
|
|||
|
|
|
#5
|
|||
|
|||
|
Thanks u very much
|
|
#6
|
|||
|
|||
|
Code:
perl -e 'while (<>) { s/[A-Za-z]//g; print }' filename
|
|||
| Google The UNIX and Linux Forums |