On Fri, Apr 15, 2022 at 08:16:22PM -0400, Greg Wooledge wrote:
ls -l .bashrc
You've got a command name, and you're passing two string arguments to
it. If you feel a need to quote every string argument, then you should
be writing it like this:
ls "-l" ".bashrc"
There's nothing special about t
On Sat 16 Apr 2022 at 08:07:09 (-0400), The Wanderer wrote:
> On 2022-04-15 at 22:52, Greg Wooledge wrote:
> > On Fri, Apr 15, 2022 at 09:47:11PM -0400, The Wanderer wrote:
> >> On 2022-04-15 at 20:47, Greg Wooledge wrote:
> >>> You're also going to exit your script with the exit status from
> >>>
On Sat, Apr 16, 2022 at 08:07:09AM -0400, The Wanderer wrote:
> ...Huh. That's so unintuitive that it hadn't even occurred to me to test
> it before posting, but I just did test it (with 'ps', not 'foobar',
> because there's a reason why 'ps' would be special for this purpose),
> and you're correct
On Sat, Apr 16, 2022 at 04:20:15PM +0800, wilson wrote:
> does bash shell have the list/array concept?
Bash has indexed arrays (since forever) and associative arrays (in
version 4.0 and above).
> ~$ list="1 2 3 4"
>
> ~$ for i in $list; do echo $i; done
> 1
> 2
> 3
> 4
>
> is this a list access
On 2022-04-15 at 22:52, Greg Wooledge wrote:
> On Fri, Apr 15, 2022 at 09:47:11PM -0400, The Wanderer wrote:
>
>> On 2022-04-15 at 20:47, Greg Wooledge wrote:
>>> You're also going to exit your script with the exit status from
>>> that last grep command. That's probably not what you want. If
>
Hello,
On Sat, Apr 16, 2022 at 10:39:03AM +0530, didar wrote:
> On Fri, Apr 15, 2022 at 10:58:01PM +, Andy Smith wrote:
> > If you happen to know their IPv6 addresses and can trust that those
> > assignments will remain stable then you may prefer instead to add
> > prohibited routes for these,
On Sat, 16 Apr 2022 at 18:20, wilson wrote:
> does bash shell have the list/array concept?
Hi, this mailing list is very kind, and as part of that kindness
I want to offer you some kind advice.
First, no mailing list will have the
patience to teach you every feature of a programming
language, o
On Sat, 16 Apr 2022, to...@tuxteam.de wrote:
On Fri, Apr 15, 2022 at 09:47:11PM -0400, The Wanderer wrote:
On 2022-04-15 at 20:47, Greg Wooledge wrote:
On Sat, Apr 16, 2022 at 08:20:40AM +0800, wilson wrote:
ps -efw |grep $PS |grep -v grep
You're also going to exit your script with the
On Fri, Apr 15, 2022 at 09:47:11PM -0400, The Wanderer wrote:
> On 2022-04-15 at 20:47, Greg Wooledge wrote:
>
> > On Sat, Apr 16, 2022 at 08:20:40AM +0800, wilson wrote:
>
> >> ps -efw |grep $PS |grep -v grep
>
> > You're also going to exit your script with the exit status from that
> > last gr
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
On Fri, Apr 15, 2022 at 10:58:01PM +, Andy Smith wrote:
> Hello,
>
> On Fri, Apr 15, 2022 at 10:34:25AM -0400, Chuck Zmudzinski wrote:
> > I have an issue with a few websites that seem to hang with ipv6
>
> If you happen to know their IPv6 addresses and can trust that those
> assignments will
On Fri, Apr 15, 2022 at 09:47:11PM -0400, The Wanderer wrote:
> On 2022-04-15 at 20:47, Greg Wooledge wrote:
> > On Sat, Apr 16, 2022 at 08:20:40AM +0800, wilson wrote:
>
> >> ps -efw |grep $PS |grep -v grep
>
> > You're also going to exit your script with the exit status from that
> > last grep
On 4/15/2022 6:58 PM, Andy Smith wrote:
Hello,
On Fri, Apr 15, 2022 at 10:34:25AM -0400, Chuck Zmudzinski wrote:
I have an issue with a few websites that seem to hang with ipv6
If you happen to know their IPv6 addresses and can trust that those
assignments will remain stable then you may prefe
On 2022-04-15 at 20:47, Greg Wooledge wrote:
> On Sat, Apr 16, 2022 at 08:20:40AM +0800, wilson wrote:
>> ps -efw |grep $PS |grep -v grep
> You're also going to exit your script with the exit status from that
> last grep command. That's probably not what you want. If it's not,
> then an explic
On Sat, Apr 16, 2022 at 08:20:40AM +0800, wilson wrote:
> Can you help check if my this script has any issue?
> #!/bin/bash
>
> PORT=$1
> if [ -z $PORT ];then
"$PORT" should be quoted here.
> echo "$0 port"
As a usage message, this is rather minimal. At least put "usage: " in
front of it.
On Sat, 16 Apr 2022 08:20:40 +0800
wilson wrote:
> I didn't know much about shell rules.
> Can you help check if my this script has any issue?
You might look into the shellcheck package. There is an extension to
use it in Emacs, and there may well be extensions for other editors.
--
Does anybo
Greg Wooledge wrote:
But nobody does that. It's simply unnecessary. Likewise, you don't need
quotes around "on" or "off" because they don't contain special characters.
You also don't need quotes around the "==" string argument that was passed
in this command. It's funny that you would think
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?
You only need quotes to force a literal interpretation of whitespace or
other special characters, or to suppress
Ash Joubert wrote:
To completely and persistently disable all ipv6 support in the kernel, I
add "ipv6.disable=1" to the Linux command line variable
GRUB_CMDLINE_LINUX in /etc/default/grub, run update-grub, and reboot. If
you have other command line arguments, they are separated by whitespace
On 15/04/2022 23:32, wilson wrote:
What's the good way to disable IPv6 in a debian system?
To completely and persistently disable all ipv6 support in the kernel, I
add "ipv6.disable=1" to the Linux command line variable
GRUB_CMDLINE_LINUX in /etc/default/grub, run update-grub, and reboot. If
Greg Wooledge wrote:
if [ "$1" == on ]
this sounds strange. why a string doesn't need "" around in shell script?
Hello,
On Fri, Apr 15, 2022 at 10:34:25AM -0400, Chuck Zmudzinski wrote:
> I have an issue with a few websites that seem to hang with ipv6
If you happen to know their IPv6 addresses and can trust that those
assignments will remain stable then you may prefer instead to add
prohibited routes for th
On 4/15/22 8:10 AM, wilson wrote:
no. it's the Hadoop system, which has the possible issue with ipv6.
thanks
I would check the documentation for Hadoop - does it have an option to
disable ipv6? I would just disable ipv6 for the app that has the issue
with ipv6, not for the whole system. I
On 4/15/22 12:08 PM, Tim Woodall wrote:
On Fri, 15 Apr 2022, Greg Wooledge wrote:
On Fri, Apr 15, 2022 at 11:21:46AM -0400, Chuck Zmudzinski wrote:
Another improvement to the script would be to have the script toggle
the
default route on or off, depending on the existence or not of the
def
On Fri, 15 Apr 2022, Greg Wooledge wrote:
On Fri, Apr 15, 2022 at 11:21:46AM -0400, Chuck Zmudzinski wrote:
Another improvement to the script would be to have the script toggle the
default route on or off, depending on the existence or not of the default
route, for the case when there is no arg
On Fri, Apr 15, 2022 at 11:21:46AM -0400, Chuck Zmudzinski wrote:
> Another improvement to the script would be to have the script toggle the
> default route on or off, depending on the existence or not of the default
> route, for the case when there is no argument to the script.
That requires some
On 4/15/22 11:12 AM, Chuck Zmudzinski wrote:
On 4/15/2022 10:50 AM, Greg Wooledge wrote:
On Fri, Apr 15, 2022 at 10:34:25AM -0400, Chuck Zmudzinski wrote:
user@debian:~$ cat ipv6
#!/bin/bash
if [ $1 == "on" ]
then
ip -6 route add default via dev
elif [ $1 == "off" ]
then
On 4/15/2022 10:50 AM, Greg Wooledge wrote:
On Fri, Apr 15, 2022 at 10:34:25AM -0400, Chuck Zmudzinski wrote:
user@debian:~$ cat ipv6
#!/bin/bash
if [ $1 == "on" ]
then
ip -6 route add default via dev
elif [ $1 == "off" ]
then
ip -6 route delete default
fi
Quotes are in the
On Fri, Apr 15, 2022 at 10:34:25AM -0400, Chuck Zmudzinski wrote:
> user@debian:~$ cat ipv6
> #!/bin/bash
> if [ $1 == "on" ]
> then
> ip -6 route add default via dev
> elif [ $1 == "off" ]
> then
> ip -6 route delete default
> fi
Quotes are in the wrong place. The [ builtin com
On 4/15/2022 8:10 AM, wilson wrote:
no. it's the Hadoop system, which has the possible issue with ipv6.
thanks
I have an issue with a few websites that seem to hang with ipv6, so I
don't want to disable ipv6 permanently but only temporarily when I want
to access those sites. One class of s
Hi,
please do not top-post.
On Fri, Apr 15, 2022 at 08:35:33PM +0800, wilson wrote:
> Reco wrote:
> > The most non-intrusive way of doing it (side effects considered) is:
> >
> > /sbin/sysctl -w net.ipv6.conf.default.disable_ipv6=1
> > /sbin/sysctl -w net.ipv6.conf.lo.disable_ipv6=0
>
>
On 15/4/22 9:59 pm, Erwan David wrote:
No. But it won't be kept if you reboot
To make it permanent you need to create the file
/etc/sysctl.d/10-disable_ipv6.conf with the 2 lines
net.ipv6.conf.default.disable_ipv6=1
net.ipv6.conf.lo.disable_ipv6=0
However make sure no other file in /etc/sy
Le 15/04/2022 à 14:35, wilson a écrit :
after doing this, do I need to restart the OS?
thanks
Reco wrote:
The most non-intrusive way of doing it (side effects considered) is:
/sbin/sysctl -w net.ipv6.conf.default.disable_ipv6=1
/sbin/sysctl -w net.ipv6.conf.lo.disable_ipv6=0
No. But it w
after doing this, do I need to restart the OS?
thanks
Reco wrote:
The most non-intrusive way of doing it (side effects considered) is:
/sbin/sysctl -w net.ipv6.conf.default.disable_ipv6=1
/sbin/sysctl -w net.ipv6.conf.lo.disable_ipv6=0
Hi.
On Fri, Apr 15, 2022 at 07:32:01PM +0800, wilson wrote:
> What's the good way to disable IPv6 in a debian system?
The most non-intrusive way of doing it (side effects considered) is:
/sbin/sysctl -w net.ipv6.conf.default.disable_ipv6=1
/sbin/sysctl -w net.ipv6.conf.lo.disable_ipv6=0
no. it's the Hadoop system, which has the possible issue with ipv6.
thanks
황병희 wrote:
If that is about mail system Postfix, you check this parameter:
> What's the good way to disable IPv6 in a debian system?
Well i don't know debian system. However i'm using Debian 11.
If that is about mail system Postfix, you check this parameter:
#+begin_src text
inet_protocols = ipv4
#+end_src
Sincerely, Linux fan Byung-Hee
--
^고맙습니다 _布德天下_ 감사합니다_^))//
37 matches
Mail list logo