regex - remove part of string from each line -


i have text file, each line single string of format

/home/usr1/284.txt 

the whole file like

/home/usr1/284.txt /home/usr1/361.txt 

what want remove /home/usr1/ , keep file name, e.g., 284.txt

how using linux/unix command?

you use perl, so:

perl -pe 's,.*/,,' file.txt 

Comments

Popular posts from this blog

jasper reports - Fixed header in Excel using JasperReports -

media player - Android: mediaplayer went away with unhandled events -

python - ('The SQL contains 0 parameter markers, but 50 parameters were supplied', 'HY000') or TypeError: 'tuple' object is not callable -