floyd 发表于 2005-11-11 09:22:50

请教一个关于sed的问题

请问下这个怎么解?
FILENAME=`echo $FILE | $SED -e 's/\.tif//' -e 's/recvq\///'`
先在此谢过。

pakix 发表于 2005-11-11 18:12:43

if $SED means sed then
from manpage
-e script, --expression=script

add the script to the commands to be executed

that will delete the string(".tif", "recvq/") in the $FILE if they exist
then pass it to FILENAME

s/A/B/
means replace A with B

X=`CMD`
pass command CMD's output to X
页: [1]
查看完整版本: 请教一个关于sed的问题