それぞれ「ヘッダー」サブフォルダーを持つ一連のサブフォルダーにファイルを抽出するプログラムがあります。例えば:
/share/Videos/Godfather.Part.1
/share/Videos/Godfather.Part.1/<packagename>
/share/Videos/Godfather.Part.1/<packagename>/Godfather.avi
/share/Videos/Godfather.Part.2
/share/Videos/Godfather.Part.2/<packagename>
/share/Videos/Godfather.Part.2/<packagename>/Godfather2.avi
<packagename>
指定したフォルダー内のファイルを取り出して、ファイル構造が次のようになるように 1 つ上のディレクトリに移動したいと思います。
/share/Videos/Godfather.Part.1
/share/Videos/Godfather.Part.1/Godfather.avi
/share/Videos/Godfather.Part.2
/share/Videos/Godfather.Part.2/Godfather2.avi
bash コマンド ラインでこのタスクを実行するにはどうすればよいですか? これは 2 つのフォルダーを使用した例です。このようなフォルダーが 100 個あります。