uhm, what?
Can you give an example where I have a file (a.txt) of 100 file names and need the basename of each? I'm pretty sure dvh just used echo to show a simple example, not an actual use.
Can you give an example where I have a file (a.txt) of 100 file names and need the basename of each? I'm pretty sure dvh just used echo to show a simple example, not an actual use.
while read line ; do basename "$line" ; done < a.txt for f in $(cat a.txt); do basename "$f"; done2. The shell will expand * and ? (maybe others) in the filenames
xargs basename -a < a.txt