![]() |
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 |
| AIX AIX is IBM's industry-leading UNIX operating system that meets the demands of applications that businesses rely upon in today's marketplace. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| extract field of characters after a specific pattern - using UNIX shell script | jansat | HP-UX | 2 | 05-28-2008 12:08 AM |
| Terminal-specific characters in password | PittWolfBW | Shell Programming and Scripting | 5 | 04-07-2008 07:08 AM |
| How to delete specific lines at the same time | zanetti321 | UNIX for Advanced & Expert Users | 1 | 03-24-2008 07:00 AM |
| delete files in specific directory | legato | Shell Programming and Scripting | 2 | 03-29-2006 09:46 PM |
| tell me how many specific characters there are? | kev269 | Shell Programming and Scripting | 7 | 03-17-2006 06:45 PM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
Hi every1
Well i have a list of numbers e.g 12304 13450 01234 00123 14567 what i want is a command to check if the number is starting from 0 and then delete the 0 without doing anything else!!!! any help wud b appreciated!!!!!!!! ![]() |
|
||||
|
I presume you want to delete all the leading zeroes, not only the first one, right? This the solution in sed:
Code:
sed 's/^00*//' /path/to/sourcefile > /path/to/resultfile I hope this helps. bakunin |
![]() |
| Bookmarks |
| Tags |
| perl, sed |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|