Created
April 21, 2021 04:00
-
-
Save kanekomasahiro/b0cd226fea9b710236aacce5aecc7f59 to your computer and use it in GitHub Desktop.
shellスクリプトでpathからデータとファイル形式を除去してfile名だけを抽出する.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # file_path=../data/hoge.bin | |
| # file_name=hoge | |
| file_name=$( echo $file_path | cut -d/ -f4 | sed -r 's/(.[^.]+){1}$//g') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment