找出活跃的Unix shell [英] Finding out the active Unix shell
问题描述
当处理
引号中的特殊字符时,csh和tcsh似乎有点不同。
ie:如果我将为我的程序提供以下参数:-winpath
" c:\\temp\\"
tcsh会把它当作-winpath" c:\ temp \"
和csh将字面意思(用双斜线)。
有没有办法让我知道目前运行我的
程序的shell是什么,所以我可以为每个shell设置不同的代码?
Hi,
It''s seems that csh and tcsh acts a bit different when handling
special characters in quotes.
i.e: if i''ll supply my program with the following arguments: -winpath
"c:\\temp\\"
tcsh will take it as -winpath "c:\temp\"
and csh will take it literally (with the double-slashes).
Is there a way for me to know what shell is currently running my
program, so I could fit a different code for each shell ?
推荐答案
6月7日,08:22,Tom Gur< gur .... @ gmail.comwrote:
On 7 Jun, 08:22, Tom Gur <gur....@gmail.comwrote:
$ b $
当处理
引号中的特殊字符时,csh和tcsh似乎有点不同。
ie:如果我将为我的程序提供以下参数:-winpath
" c:\\temp \\&q uot;
tcsh将把它作为-winpath" c:\ temp \"
和csh将字面意思(使用双斜线)。
有没有办法让我知道目前运行我的
程序的shell,所以我可以为每个shell设置不同的代码?
Hi,
It''s seems that csh and tcsh acts a bit different when handling
special characters in quotes.
i.e: if i''ll supply my program with the following arguments: -winpath
"c:\\temp\\"
tcsh will take it as -winpath "c:\temp\"
and csh will take it literally (with the double-slashes).
Is there a way for me to know what shell is currently running my
program, so I could fit a different code for each shell ?
不是用C语言本身。
我建议你在comp.unix.programmer中提问。
Not in the C language per se.
I suggest you ask the question in comp.unix.programmer.
" Tom Gur" < gu ***** @ gmail.comschrieb im Newsbeitrag
news:11 ********************** @ o5g2000hsb。 googlegro ups.com ...
"Tom Gur" <gu*****@gmail.comschrieb im Newsbeitrag
news:11**********************@o5g2000hsb.googlegro ups.com...
似乎csh和tcsh的行为有点不同当处理
引号中的特殊字符时。
ie:如果我将为我的程序提供以下参数:-winpath
" c:\\temp \\"
tcsh将其视为-winpath" c:\ temp \"
和csh将从字面上看(用双斜线)。
有没有办法让我知道目前运行我的
程序的shell,所以我可以为每个shell适合不同的代码?
Hi,
It''s seems that csh and tcsh acts a bit different when handling
special characters in quotes.
i.e: if i''ll supply my program with the following arguments: -winpath
"c:\\temp\\"
tcsh will take it as -winpath "c:\temp\"
and csh will take it literally (with the double-slashes).
Is there a way for me to know what shell is currently running my
program, so I could fit a different code for each shell ?
这与C有什么关系?你为什么在
comp.lang.c中发布这个问题?
环境变量
What has this got to do with C and why do you post this question in
comp.lang.c?
the environment variable
SHELL可能有所帮助。但您也可以查询
comp.unix.programmer
再见,Jojo
SHELL might help. But you may also check in
comp.unix.programmer
Bye, Jojo
这篇关于找出活跃的Unix shell的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!