[PLUG] what is the meaning of '~~' in a shell script?

Mike Cherba mcherba at gmail.com
Fri May 30 17:32:46 UTC 2014


I'd search for it by simply referring to "~" by it's name "tilde"  However,
a quick check reveals the standard bash tilde expansion and doesn't talk
about what a pair of tildes might expand to.
http://www.gnu.org/software/bash/manual/html_node/Tilde-Expansion.html

Another possibility, which seems more likely is checking out the Linux
Hotplug syntax page.  There  they use lines of tildes to designate code
blocks.  I'd guess from the text you posted that this is what is going on
here.  They are being used to designate a named block or something.



On Fri, May 30, 2014 at 10:24 AM, Galen Seitz <galens at seitzassoc.com> wrote:

> I'm looking at the hotplug rules on an OpenWRT router.  Here's a excerpt.
>
> SUBSYSTEM ~~
> (^net$|^input$|^button$|^usb$|^ieee1394$|^block$|^atm$|^zaptel$|^tty$) {
>         exec /sbin/hotplug-call %SUBSYSTEM%
> }
>
>
> What is the meaning of the '~~'?
>
> How could I have found the answer myself with a search?  (i.e. is there
> a way to search for ~~)
>
> thanks,
> galen
> --
> Galen Seitz
> galens at seitzassoc.com
> _______________________________________________
> PLUG mailing list
> PLUG at lists.pdxlinux.org
> http://lists.pdxlinux.org/mailman/listinfo/plug
>



-- 
“There are two ways of constructing a software design: One way is to make
it so simple that there are obviously no deficiencies, and the other way is
to make it so complicated that there are no obvious deficiencies. The first
method is far more difficult.” ― C.A.R. Hoare
<http://www.goodreads.com/author/show/266154.C_A_R_Hoare>



More information about the PLUG mailing list