* what's ${1##*/}
@ 2002-12-20 23:52 wolfgang
2002-12-21 14:52 ` ichi
0 siblings, 1 reply; 2+ messages in thread
From: wolfgang @ 2002-12-20 23:52 UTC (permalink / raw)
To: linux-newbie
Hi there,
I found the statement below in killproc() of /etc/init.d/functions script.
base=${1##*/}
I don't understand what this statement doing..
Looks like that put the first argument into variable named base, but
what's ##*/ ?? is this a regular expression ??? hm...
Anyone knows ??
Thank you.
wolfgang-
--
wolfgang <wolfgang127jp@ybb.ne.jp>
-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: what's ${1##*/}
2002-12-20 23:52 what's ${1##*/} wolfgang
@ 2002-12-21 14:52 ` ichi
0 siblings, 0 replies; 2+ messages in thread
From: ichi @ 2002-12-21 14:52 UTC (permalink / raw)
To: wolfgang; +Cc: linux-newbie
wolfgang wrote:
>
> I found the statement below in killproc() of
> /etc/init.d/functions script.
>
> base=${1##*/}
This is a bash structure used to remove parts of a
variable. The variable is $1. The ##*/ means that
everything before the last / is removed. Therefore,
if $1 is the full pathname of a file, $base will be
the filename (without the path).
Cheers,
Steven
______________________________
http://www.volny.cz/basiclinux
-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2002-12-21 14:52 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-12-20 23:52 what's ${1##*/} wolfgang
2002-12-21 14:52 ` ichi
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox