![]() |
|
|
|||
|
Re: diference between single slash and double
On 2008-07-20, heavytull wrote:
> does anyone know the difference between running an application in the two > following ways? > > #/sbin/'any_binary' > and > #/sbin//'any_binary' There is no difference; // is the same as /. -- Chris F.A. Johnson, author | <http://cfaj.freeshell.org> Shell Scripting Recipes: | My code in this post, if any, A Problem-Solution Approach | is released under the 2005, Apress | GNU General Public Licence |
|
|||
|
Re: diference between single slash and double
On Sun, 20 Jul 2008 20:59:47 +0000, Chris F.A. Johnson wrote:
> On 2008-07-20, heavytull wrote: >> does anyone know the difference between running an application in the >> two following ways? >> >> #/sbin/'any_binary' >> and >> #/sbin//'any_binary' > > There is no difference; // is the same as /. is it same with | and ||? |
|
|||
|
Re: diference between single slash and double
heavytull <heavytull@hotmail.com> writes:
>On Sun, 20 Jul 2008 20:59:47 +0000, Chris F.A. Johnson wrote: >> On 2008-07-20, heavytull wrote: >>> does anyone know the difference between running an application in the >>> two following ways? >>> >>> #/sbin/'any_binary' >>> and >>> #/sbin//'any_binary' >> >> There is no difference; // is the same as /. >is it same with | and ||? No. Nor is it the same with a and aa |
|
|||
|
Re: diference between single slash and double
> #/sbin//'any_binary'
"//" means a real single character "/" in certain programming languages. -- @~@ Might, Courage, Vision, SINCERITY. / v \ Simplicity is Beauty! May the Force and Farce be with you! /( _ )\ (Xubuntu 8.04) Linux 2.6.26 ^ ^ 21:53:01 up 8 days 1:18 6 users load average: 1.01 1.00 1.00 ? ? (CSSA): http://www.swd.gov.hk/tc/index/site_...ub_addressesa/ |
|
|||
|
Re: diference between single slash and double
Man-wai Chang ToDie (33.6k) wrote:
>> #/sbin//'any_binary' > > "//" means a real single character "/" in certain programming languages. > the first "/" is called an escape character. -- @~@ Might, Courage, Vision, SINCERITY. / v \ Simplicity is Beauty! May the Force and Farce be with you! /( _ )\ (Xubuntu 8.04) Linux 2.6.26 ^ ^ 21:59:01 up 8 days 1:24 6 users load average: 1.43 1.17 1.06 ? ? (CSSA): http://www.swd.gov.hk/tc/index/site_...ub_addressesa/ |
|
|||
|
Re: diference between single slash and double
"Man-wai Chang ToDie (33.6k)" <toylet.toylet@gmail.com> writes:
>Man-wai Chang ToDie (33.6k) wrote: >>> #/sbin//'any_binary' >> >> "//" means a real single character "/" in certain programming languages. >> >the first "/" is called an escape character. Uh, no. you got your slashes turned around -\\ is a single \ in shell programming. But in a path in the unix filesystem, // means the same as / and / is not an escape character. This is to make shell scripting easier. eg you could have defines A= /usr/local/ and later used ${A}/bin/program to run a program. That expands to /usr/local//bin/program. If that // were not interpreted as / this would mean you would have to be very careful in defining your variables-- unnecessarily so since there is nothing that // could mean but / >-- > @~@ Might, Courage, Vision, SINCERITY. > / v \ Simplicity is Beauty! May the Force and Farce be with you! >/( _ )\ (Xubuntu 8.04) Linux 2.6.26 > ^ ^ 21:59:01 up 8 days 1:24 6 users load average: 1.43 1.17 1.06 >? ? (CSSA): >http://www.swd.gov.hk/tc/index/site_...ub_addressesa/ |
![]() |
|
| Thread Tools | Search this Thread |
| Display Modes | |
|
|