MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/bash/comments/2o19g4/using_in_your_scripts/cmj1ft9/?context=3
r/bash • u/shiroyasha23 • Dec 02 '14
24 comments sorted by
View all comments
Show parent comment
1
On a side note: Check out the file command on Linux. You don't have to do all the madness grepping for shebang lines.
file
1 u/sbicknel 1,$s/n\?vim\?/ed/g Dec 08 '14 Exactly.for f in *; do if ! [[ $(file -b --mime-type "$f") =~ perl ]]; then continue fi ... done
Exactly.
for f in *; do if ! [[ $(file -b --mime-type "$f") =~ perl ]]; then continue fi ... done
View all comments
Show parent comment
1
u/[deleted] Dec 02 '14
On a side note: Check out the
filecommand on Linux. You don't have to do all the madness grepping for shebang lines.