Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | ||||
4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 | 12 | 13 | 14 | 15 | 16 | 17 |
18 | 19 | 20 | 21 | 22 | 23 | 24 |
25 | 26 | 27 | 28 | 29 | 30 | 31 |
Tags
- JavaScript
- lsof
- VirtualBox
- 단축키
- Mac
- bash
- 줄바꿈 문자
- GIT
- Eclipse
- netsh
- IntelliJ
- web.xml
- ssh
- Source
- profile
- vscode
- import
- port
- plugin
- tomcat
- resource
- maVen
- Windows 10
- find
- grep
- 네트워크
- xargs
- Quartz
- Windows
- context
Archives
- Today
- Total
develog
[bash] split path & filename 본문
file=aa/bb/cc/dd_ee.txt
path=`dirname "$file"`
name=`basename "$file"`
stackoverflow.com/questions/13767252/ubuntu-bash-script-how-to-split-path-by-last-slash
Ubuntu bash script: how to split path by last slash?
I have a file (say called list.txt) that contains relative paths to files, one path per line, i.e. something like this: foo/bar/file1 foo/bar/baz/file2 goo/file3 I need to write a bash script that
stackoverflow.com
'OS & Shell > bash' 카테고리의 다른 글
[bash] source, include other bash file (0) | 2021.04.01 |
---|---|
[bash] find egrep xargs grep, 파일 리스트 / 파일 내용 검색 (0) | 2021.03.22 |
[bash] del-log.sh (0) | 2021.03.02 |
[bash] 변수값을 '_' (underscore) 로 연결하기 (0) | 2021.03.02 |
[bash] executing commands remotely using ssh (0) | 2020.09.18 |
Comments