From: ichi@ihug.co.nz
To: wolfgang <wolfgang127jp@ybb.ne.jp>
Cc: linux-newbie@vger.kernel.org
Subject: Re: what's ${1##*/}
Date: Sat, 21 Dec 2002 14:52:45 +0000 [thread overview]
Message-ID: <3E04803D.D79BC7E@ihug.co.nz> (raw)
In-Reply-To: 20021221084841.659D.WOLFGANG127JP@ybb.ne.jp
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
prev parent reply other threads:[~2002-12-21 14:52 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-12-20 23:52 what's ${1##*/} wolfgang
2002-12-21 14:52 ` ichi [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3E04803D.D79BC7E@ihug.co.nz \
--to=ichi@ihug.co.nz \
--cc=linux-newbie@vger.kernel.org \
--cc=wolfgang127jp@ybb.ne.jp \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox