作者costbook (antitheist)
站内Programming
标题Re: [问题] shell的小问题
时间Sat Nov 11 07:56:05 2006
=== 站内 ===
我记得...
引数若是hello world,则hello和world会
分别传给 $1和$2,你要把$1和$2合起来,
再下grep
※ 引述《indept (真人)》之铭言:
: 一个简单的shell程式 go.sh
: #!/bin/tcsh
: grep $1 *.c
: ============
: #./go.sh hello
: 没问题
: #./go.sh hello world
: #./go.sh 'hello world'
: #./go.sh "hello world"
: 都不行, 请问要如何写才对呢?
--
树大有枯枝,人多有白痴
--
※ 发信站: 批踢踢实业坊(ptt.cc)
◆ From: 220.139.153.133