Reputation: 59
I need to remove names from output of file.
I am using
file $variable -N
then i use sed
but it didn't work.
Output of file is
./: directory
./whatever: data
./testfile: ASCII text
and I expect output from sed
directory
data
ASCII text
Thanks for help!
Upvotes: 0
Views: 50
Reputation: 14949
You don't need any external command. Use -b
option in file
command.
file -b file
From
man file
:-b, --brief Do not prepend filenames to output lines (brief mode).
Upvotes: 1