QQ登录

只需一步,快速开始

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 949|回复: 1

请教一个关于sed的问题

[复制链接]
发表于 2005-11-11 09:22:50 | 显示全部楼层 |阅读模式
请问下这个怎么解?
FILENAME=`echo $FILE | $SED -e 's/\.tif//' -e 's/recvq\///'`
先在此谢过。
发表于 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
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

GMT+8, 2024-9-30 10:23 , Processed in 0.042065 second(s), 16 queries .

© 2021 Powered by Discuz! X3.5.

快速回复 返回顶部 返回列表