l don't believe you, tell them to
contact me directly.
-Martin Kealey
*1: if you suspect that the person is over 70, you'd best avoid their given
name entirely, and stick to honorific+surname.
Mr/Mrs Firstname is common in the subcontinent - and elsewhere in the
middle east.
Your prejudices should not warrant a rant.
--
Chris Elvidge
England
On 08/12/2022 19:34, Ángel wrote:
On 2022-12-07 at 12:38 +, Chris Elvidge wrote:
I don't use Python generally, but my understanding of it (only a
quick test)
f = open("demofile2.txt", "a")
f.write("Now the file has more content!")
f.close()
f.write does
On 06/12/2022 23:39, L A Walsh wrote:
On 2022/12/06 10:57, Chris Elvidge wrote:
Yair, how about using the Python installed in the WSL instance.
---
Oh, I wondered why Python used CRLF, but nothing else did.
What version of python are you using? The Python for WSL,
the python for
there.
Windows text files have to be converted to Linux format before
processing - either inline (tr -d '\r') or in mass (dos2unix).
Expecting bash to cope is a non-starter.
Yair, how about using the Python installed in the WSL instance.
--
Chris Elvidge
England
On 28/03/2022 22:00, Greg Wooledge wrote:
Or -- and I know this answer will be rejected, because it's too simple
and sensible -- stop using aliases in scripts.
+1
Or could just stop answering questions about aliases in scripts
--
Chris Elvidge
England
blabla
EOF
)
This would break backward compatibility and POSIX compliance.
I'm sure there are real life scripts that have leading spaces in their
here-doc payloads which should be preserved.
Yes there are.
--
Chris Elvidge
England
edirects both stderr and stdout to
`/dev/null'.
Oğuz
If you want to parse them as two separate commands, separate them.
--
Chris Elvidge
England
On 29/03/2021 12:04 pm, ილია ჩაჩანიძე wrote:
How can I set default PS1 variable from source code?
E.g I want it to display:
My-linux-distro $
And not:
Bash-5.1 $
Set it in $HOME/.bashrc
--
Chris Elvidge
England
$PWD
If you want to register the current directory in $PS1 regardless, change
\w to `pwd`
--
Chris Elvidge
England
'x' ε in ε '(' 'x' ')' ε if_clause Esac
-> ...
where ε is an empty string. OK, now I understood this behavior is
actually required by the POSIX standard. Can we find any textual
explanation on this rule? Or maybe this behavior is intuitive enough
for those who understand the shell grammar so that they don't see the
necessity of an additional explanation...
Thank you for the comment!
--
Koichi
--
Chris Elvidge
England
eir terminal.
Where this can be even more annoying is if your terminal's response to a
tab
is different than that used on old-hardware terminals.
Thanks,
-l
Try Ctrl-V before hitting .
--
Chris Elvidge
England
t ${var^} still doesn't know that it should apply to the first alpha
character in a string. Similar for , and ~. If the first character of
the string is a punctuation character, e.g.(, it doesn't work (as I
would like it to ).
--
Chris Elvidge
England
up to you to check if version X-1 is being used and throw an error
there. Isn't that what $BASH_VERSION / $BASH_VERSINFO is for?
--
Chris Elvidge
England
gendorf
Telefon +41 61 417 10 68
Web www.bpm.ch<http://www.bpm.ch/>
From man bash:
((expression))
The expression is evaluated according to the rules described
below under ARITHMETIC EVALUATION. If the value of the
expression is non-zero, the return status is 0; otherwise the
return statu
oose for the first expansion?
Thanks for the suggestion.
--
Chris Elvidge
England
it.
Are the two uses (array subscript and arithmetic context) of [...]
connected/related? Or am I (stupidly) seeing a connection where none
really exists?
Thanks
--
Chris Elvidge
England
On 06/07/2020 12:50 pm, Greg Wooledge wrote:
On Fri, Jul 03, 2020 at 07:00:54PM +0100, Chris Elvidge wrote:
I've used 'return $((!$#))' and 'return $[!$#]' to return an error if no
parameters given to function.
The problem with this is that it *always* returns fro
On 03/07/2020 11:16 pm, Eli Schwartz wrote:
On 7/3/20 2:00 PM, Chris Elvidge wrote:
I've used 'return $((!$#))' and 'return $[!$#]' to return an error if no
parameters given to function.
Tested in a bash script 'exit $((!$#)) / $[!$#]' - both work.
'ech
On 03/07/2020 10:39 pm, Lawrence Velázquez wrote:
On Jul 3, 2020, at 2:00 PM, Chris Elvidge wrote:
However 'N=0; echo $((!$N))' gives an error at the bash prompt.
'echo $[!$N]' echo's 1 as expected.
My question - is $[...] actually obsolete?
It might tell you som
On 03/07/2020 11:16 pm, Eli Schwartz wrote:
On 7/3/20 2:00 PM, Chris Elvidge wrote:
I've used 'return $((!$#))' and 'return $[!$#]' to return an error if no
parameters given to function.
Tested in a bash script 'exit $((!$#)) / $[!$#]' - both work.
'ech
On 03/07/2020 10:39 pm, Lawrence Velázquez wrote:
On Jul 3, 2020, at 2:00 PM, Chris Elvidge wrote:
However 'N=0; echo $((!$N))' gives an error at the bash prompt.
'echo $[!$N]' echo's 1 as expected.
My question - is $[...] actually obsolete?
It might tell you som
...] actually obsolete? If so, what should I use at
the bash prompt to get the same effect?
Cheers
--
Chris Elvidge
22 matches
Mail list logo