ファイル検索関数で引数を渡す方法を探しています。これにより、コンピューター内のすべてのshファイルに最初にベース名、次にすべてのディレクトリのタブが表示されます。たとえばmyBashfile.sh *sh
、現時点ではこれがあります:while getopts b opt do case $opt in b) find / -name $OPTARG -printf "%f\n"-print 2>/dev/null ;; test1.sh test60.sh anothertest.sh の出力のみを与える esac done wich
しかし、出力として必要です:(タブ付き)test1.sh /home/directory5/directory6 test60.sh /home/directory50/directory6 anothertest.sh /home/directory5/directory6
誰でも私を助けてくれますか?