Im looking how to pass an argument in a find file function
this should give all the sh files in my computer first the basename a tab with then all
the directories
For example myBashfile.sh *sh
at the moment i have this:
while getopts b opt
do
case $opt in
b) find / -name $OPTARG -printf "%f\n"-print 2>/dev/null ;;
esac
done
wich gives only the output of
test1.sh
test60.sh
anothertest.sh
but i need as output: (with a tab) test1.sh /home/directory5/directory6 test60.sh /home/directory50/directory6 anothertest.sh /home/directory5/directory6
can anyone help me please?