Better HN
top
new
best
ask
show
jobs
Log in
Sign up
Better HN
Comment
by
erdbeerkaese
· 11y ago · 0 comments
Another way:
while read line ; do basename "$line" ; done < a.txt
Comments
[–]
wyldfire
11y ago
Yeah, I think I prefer yours. Probably more robust wrt filenames-with-whitespace too.
[–]
protomyth
11y ago
Both solutions although nice and helpful pretty much illustrate why I ended up writing a filter capable version.