![]() |
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 |
| Replacing a string in nth line | maxmave | Shell Programming and Scripting | 1 | 06-04-2008 05:32 PM |
| regexp to get first line of string | jonas.gabriel | Shell Programming and Scripting | 3 | 05-09-2007 03:46 AM |
| get the NF of a string line | ozzman | Shell Programming and Scripting | 5 | 02-02-2007 01:01 AM |
| How I Can get String From the Line | habuzahra | UNIX for Dummies Questions & Answers | 2 | 10-29-2006 07:55 AM |
| Add string after line X | alienET | Shell Programming and Scripting | 2 | 10-13-2005 09:52 PM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
To cut end string from line
HI,
I want to cut end string from line. e.g. i have following input line /users/home/test.txt I want to get end string 'test.txt' from above line and length of that end string will change and it always start after '/'. Thanks, Visu |
|
||||
|
awk
Hi,
input: Code:
/users/home/test.txt /users/home/bin/test_test.txt /users/local/home/testaa.txt Code:
test.txt test_test.txt testaa.txt Code:
awk 'BEGIN{FS="/"}
{
print $NF
}' filename
|
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|