사용자 도구

사이트 도구


devel:bash:expression

문서의 이전 판입니다!


Bash

Expression

#!/bin/sh
#
 
expression() {
file="/home/starlits/html/long.file.name"
 
echo "
${file##/*/}    #                     long.file.name
${file#/*/}     #       starlits/html/long.file.name
$file           # /home/starlits/html/long.file.name
${file%.*}      # /home/starlits/html/long.file
${file%%.*}     # /home/starlits/html/long
"
}
expression
devel/bash/expression.1178880288.txt.gz · 마지막으로 수정됨: (바깥 편집)