I am not able to parse the following

I am not able to parse the following

am 05.11.2007 21:07:04 von parag_paul

hi all,

echo $TOOL_HOME | cut -c1-1`"

What is the meaning of the cut statement above .
Sorry if it looks silly, but my understanding of -c is
output only the following characters,

But here I see 1-1'"

What could be that ?

Re: I am not able to parse the following

am 05.11.2007 21:16:21 von Ed Morton

parag_paul@hotmail.com wrote:
> hi all,
>
> echo $TOOL_HOME | cut -c1-1`"
>
> What is the meaning of the cut statement above .
> Sorry if it looks silly, but my understanding of -c is
> output only the following characters,
>
> But here I see 1-1'"
>
> What could be that ?
>

a typo.

Re: I am not able to parse the following

am 06.11.2007 08:35:17 von Barry Margolin

In article <_oKdna9wmOOa57LanZ2dnUVZ_uPinZ2d@comcast.com>,
Ed Morton wrote:

> parag_paul@hotmail.com wrote:
> > hi all,
> >
> > echo $TOOL_HOME | cut -c1-1`"
> >
> > What is the meaning of the cut statement above .
> > Sorry if it looks silly, but my understanding of -c is
> > output only the following characters,
> >
> > But here I see 1-1'"
> >
> > What could be that ?
> >
>
> a typo.

Or it's not the whole thing. Those look like the closing back-tick and
double-quote of a quoted command substitution. E.g. something like:

FIRST_CHAR="`echo $TOOL_HOME | cut -c1-1`"

will set FIRST_CHAR to the first character of $TOOL_HOME. Double-quote
and back-tick are used in matched pairs.

--
Barry Margolin, barmar@alum.mit.edu
Arlington, MA
*** PLEASE post questions in newsgroups, not directly to me ***
*** PLEASE don't copy me on replies, I'll read them in the group ***

Re: I am not able to parse the following

am 06.11.2007 12:38:52 von Ed Morton

Barry Margolin wrote:
> In article <_oKdna9wmOOa57LanZ2dnUVZ_uPinZ2d@comcast.com>,
> Ed Morton wrote:
>
>
>>parag_paul@hotmail.com wrote:
>>
>>>hi all,
>>>
>>>echo $TOOL_HOME | cut -c1-1`"
>>>
>>>What is the meaning of the cut statement above .
>>>Sorry if it looks silly, but my understanding of -c is
>>>output only the following characters,
>>>
>>>But here I see 1-1'"
>>>
>>>What could be that ?
>>>
>>
>>a typo.
>
>
> Or it's not the whole thing. Those look like the closing back-tick and
> double-quote of a quoted command substitution. E.g. something like:
>
> FIRST_CHAR="`echo $TOOL_HOME | cut -c1-1`"
>
> will set FIRST_CHAR to the first character of $TOOL_HOME. Double-quote
> and back-tick are used in matched pairs.
>

That'd be a very odd way to write it, though, compared to:

FIRST_CHAR=`echo "$TOOL_HOME" | cut -c1`

Ed.

Re: I am not able to parse the following

am 07.11.2007 14:00:05 von hymie_

In our last episode, the evil Dr. Lacto had captured our hero,
"parag_paul@hotmail.com" , who said:

>echo $TOOL_HOME | cut -c1-1`"

is not the same as

>But here I see 1-1'"

>What could be that ?

Perhaps this is one line in a longer command pipeline?

--hymie! http://lactose.homelinux.net/~hymie hymie@lactose.homelinux.net
------------------------ Without caffeine for 372 days ------------------------