Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.debian.user > #247280
| From | <tomas@tuxteam.de> |
|---|---|
| Newsgroups | linux.debian.user |
| Subject | Re: disable IPv6 debian |
| Date | 2022-04-16 08:20 +0200 |
| Message-ID | <EcJWN-94q5-3@gated-at.bofh.it> (permalink) |
| References | (1 earlier) <EcsMh-8TTW-9@gated-at.bofh.it> <Ectfj-8UiU-7@gated-at.bofh.it> <EcvAt-8VxH-7@gated-at.bofh.it> <EcvAt-8VxH-5@gated-at.bofh.it> <EcEaJ-90SX-3@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
[Multipart message — attachments visible in raw view] - view raw
On Sat, Apr 16, 2022 at 08:06:23AM +0800, wilson wrote: > > > Greg Wooledge wrote: > > if [ "$1" == on ] > > this sounds strange. why a string doesn't need "" around in shell script? Shell works by text substitution. If you have foo $bar $baz the shell first replaces $bar and $baz by their values. Suppose bar is `123', baz is `a multi-word string', then the next round is foo 123 a multi-word string Then the shell splits the result in words, goes to look up `foo' in all the places $PATH says it should look (yes, I've taken a HUGE shortcut here, chime in to fill the voids ;-), and the command foo (say /usr/local/bin/foo) gets to see four parameters: `123', `a', `multi-word' and `string'. The quotes hold together things; different rules hold for single quotes (do not substitute $vars) and double quotes (do substitute). So if you want to invoke foo with two params, it is foo $bar "$baz" If you don't know whether bar could contain a space and you also want to have bar in one piece, better safe than sorry: foo "$bar" "$baz" Text substitution systems were a thing in the 1970ies..1990ies. They do have interesting properties, and survive in some odd places, the shells being one (TeX, METAFONT, Tcl come to mind, too). And oh, the C preprocessor. Cheers -- t
Back to linux.debian.user | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
disable IPv6 debian wilson <info@bigcount.xyz> - 2022-04-15 13:50 +0200
Re: disable IPv6 debian 황병희 <soyeomul@doraji.xyz> - 2022-04-15 14:00 +0200
Re: disable IPv6 debian wilson <info@bigcount.xyz> - 2022-04-15 14:30 +0200
Re: disable IPv6 debian Greg Wooledge <greg@wooledge.org> - 2022-04-15 17:00 +0200
Re: disable IPv6 debian Greg Wooledge <greg@wooledge.org> - 2022-04-15 18:00 +0200
Re: disable IPv6 debian Tim Woodall <debianuser@woodall.me.uk> - 2022-04-15 18:10 +0200
Re: disable IPv6 debian wilson <info@bigcount.xyz> - 2022-04-16 02:10 +0200
Re: disable IPv6 debian Greg Wooledge <greg@wooledge.org> - 2022-04-16 02:20 +0200
Re: disable IPv6 debian wilson <info@bigcount.xyz> - 2022-04-16 02:30 +0200
Re: disable IPv6 debian Charles Curley <charlescurley@charlescurley.com> - 2022-04-16 02:40 +0200
Re: disable IPv6 debian Greg Wooledge <greg@wooledge.org> - 2022-04-16 02:50 +0200
Re: disable IPv6 debian wilson <info@bigcount.xyz> - 2022-04-16 03:10 +0200
Re: disable IPv6 debian The Wanderer <wanderer@fastmail.fm> - 2022-04-16 03:50 +0200
Re: disable IPv6 debian wilson <info@bigcount.xyz> - 2022-04-16 04:10 +0200
Re: disable IPv6 debian Greg Wooledge <greg@wooledge.org> - 2022-04-16 05:00 +0200
Re: disable IPv6 debian The Wanderer <wanderer@fastmail.fm> - 2022-04-16 14:10 +0200
Re: disable IPv6 debian Greg Wooledge <greg@wooledge.org> - 2022-04-16 15:10 +0200
Re: disable IPv6 debian David Wright <deblis@lionunicorn.co.uk> - 2022-04-16 18:10 +0200
Re: disable IPv6 debian <tomas@tuxteam.de> - 2022-04-16 08:20 +0200
Re: disable IPv6 debian Tim Woodall <debianuser@woodall.me.uk> - 2022-04-16 08:40 +0200
Re: disable IPv6 debian wilson <info@bigcount.xyz> - 2022-04-16 10:30 +0200
Re: disable IPv6 debian David <bouncingcats@gmail.com> - 2022-04-16 10:50 +0200
Re: disable IPv6 debian Greg Wooledge <greg@wooledge.org> - 2022-04-16 15:00 +0200
Re: disable IPv6 debian Michael Stone <mstone@debian.org> - 2022-04-16 20:00 +0200
Re: disable IPv6 debian <tomas@tuxteam.de> - 2022-04-16 08:20 +0200
Re: disable IPv6 debian Chuck Zmudzinski <brchuckz@netscape.net> - 2022-04-15 19:40 +0200
Re: disable IPv6 debian Andy Smith <andy@strugglers.net> - 2022-04-16 01:00 +0200
Re: disable IPv6 debian didar <nosferatu@purlo.in> - 2022-04-16 07:10 +0200
Re: disable IPv6 debian Andy Smith <andy@strugglers.net> - 2022-04-16 11:50 +0200
Re: disable IPv6 debian Reco <recoverym4n@enotuniq.net> - 2022-04-15 14:30 +0200
Re: disable IPv6 debian wilson <info@bigcount.xyz> - 2022-04-15 14:40 +0200
Re: disable IPv6 debian Erwan David <erwan@rail.eu.org> - 2022-04-15 16:00 +0200
Re: disable IPv6 debian Jeremy Ardley <jeremy@ardley.org> - 2022-04-15 16:20 +0200
Re: disable IPv6 debian Reco <recoverym4n@enotuniq.net> - 2022-04-15 16:20 +0200
Re: disable IPv6 debian wilson <info@bigcount.xyz> - 2022-04-16 02:20 +0200
Re: disable IPv6 debian Ash Joubert <ash@transient.nz> - 2022-04-16 02:20 +0200
csiph-web