Extract Filename in bash

bash shell에서 filename을 쉽게 추출하는 방법이 있었다.

filename="${fullfile##*/}"

References:
[1] Extract filename and extension in bash, stackoverflow, http://stackoverflow.com/questions/965053/extract-filename-and-extension-in-bash
[2] 문자열 조작, 고급 Bash 스크립팅 가이드: Bash를 이용한 쉘 스크립팅 완전 가이드, https://wiki.kldp.org/HOWTO/html/Adv-Bash-Scr-HOWTO/string-manipulation.html

Advertisements
Tagged with: ,
Posted in 2) Computer Engineering

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

누적 방문자 수
  • 93,229 hits
%d bloggers like this: