![]() |
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 |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Trying to remove single character from a line | Iz3k34l | UNIX for Dummies Questions & Answers | 5 | 07-07-2007 01:29 PM |
| Vi single character change | Brett Taylor | Shell Programming and Scripting | 6 | 08-30-2006 02:07 PM |
| wildcard | abhi | UNIX for Dummies Questions & Answers | 13 | 02-15-2005 01:43 AM |
| reading a single character in C | alodha | High Level Programming | 3 | 01-28-2005 06:22 AM |
| Find wildcard .shtml files in wildcard directories and removing them- How's it done? | Neko | UNIX for Dummies Questions & Answers | 1 | 06-27-2001 09:06 AM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
Could someone tell me the single character wildcard for SED?
I have the file below: Code:
$ more input2 AAA /A/B/C BBB /D/E/F CCC /G/H/I DDD AAA BBB CCC I tried to do it in SED by the command below but I couldn't find out the single character wildcard and failed. $ sed "s/\/.*\/?//g" input3 If there's an awk solution to the above please tell me as well. Any help will be appreciated. |
|
||||
|
Thanks vino.
I understood how the command worked. But it only works for removing strings with a fixed number of characters after the forward slash. If I had an input with unfixed number of characters after the forward slash like below: Code:
$ more input2 AAA /aaa/B/C BBB /D/E/ff CCC /D/eeee/F DDD AAA BBB CCC DDD |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|