変数testpathに/home/sekino/Linux/how.to.linuxという値を設定しておくと、
$ echo ${testpath##/*/}
how.to.linux
$ echo ${testpath#/*/}
sekino/Linux/how.to.linux
$ echo ${testpath%%.*}
/home/sekino/Linux/how
$ echo ${testpath%.*}
/home/sekino/Linux/how.to
#!/bin/sh
file=scan01.jpg
echo ${file}
echo ${file%jpg}
echo ${file%jpg}png
変数を数値として扱いたいときは、declareコマンドで指定します。
declare -i test
test=1
test=$test+1
echo $test
*メニュー
最新の20件
2018-04-17
2012-01-07
2011-12-07
2011-11-03
2011-10-20
2011-10-18
2014-07-13
2013-08-10
2012-01-26
2012-01-25
2012-01-24
2012-01-23
2012-01-21
2012-01-20
2012-01-19
2012-01-17
2012-01-14
2012-01-13
2012-01-09
人気の10件
- counter: 1588
- today: 1
- yesterday: 0
- online: 1