由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
Unix版 - How to extract Last string in one line (Windows NT SHELL script)
相关主题
shell script help?为什么我就是不会写Shell script?
shell script questionHow to set environment variables for CGI scripts?
一个很丢人的问题how to convert csh shell script to dos batch file
Shell programming problem, Thx!a question in shell script
which shell is best?Help! shell programming
shell programming[转载] a question about shell script
where can I find some good website for C Shell ?Shell Script Question about Hostname
Shell ScriptShell Script Question
相关话题的讨论汇总
话题: nt话题: windows话题: string话题: script话题: shell
进入Unix版参与讨论
1 (共1页)
M*****t
发帖数: 40
1
I know how to do in Unix script.
but I don't know how to do it in Windows(NT) DOS script.
string is "c:\a\b\c\d\file"
How can I write the script to return "file" only from above string?
[Note: the above string is just an example, it stands for any path with any
length.]
Thanks a lot!
c*****t
发帖数: 1879
2
echo a\b\c|sed 's/.*\\\\//g'

any

【在 M*****t 的大作中提到】
: I know how to do in Unix script.
: but I don't know how to do it in Windows(NT) DOS script.
: string is "c:\a\b\c\d\file"
: How can I write the script to return "file" only from above string?
: [Note: the above string is just an example, it stands for any path with any
: length.]
: Thanks a lot!

1 (共1页)
进入Unix版参与讨论
相关主题
Shell Script Questionwhich shell is best?
Help on shell scriptshell programming
[转载] Re: shell script questionwhere can I find some good website for C Shell ?
Korn shell scriptShell Script
shell script help?为什么我就是不会写Shell script?
shell script questionHow to set environment variables for CGI scripts?
一个很丢人的问题how to convert csh shell script to dos batch file
Shell programming problem, Thx!a question in shell script
相关话题的讨论汇总
话题: nt话题: windows话题: string话题: script话题: shell