* 2021-07-30 07:41:23-0400, Greg Wooledge wrote:
> On Fri, Jul 30, 2021 at 08:48:28AM +0300, Teemu Likonen wrote:
>> You have already got answers but here is another. Bash has a special
>> arithmetic evaluation mode which happens in:
>>
>> let ... # returns true (0) or false (1)
>>
On Fri, Jul 30, 2021 at 08:48:28AM +0300, Teemu Likonen wrote:
> scanimage > /home/mick/DATA/SCANS/scan-$((++ct)).pnm
Correct, but not necessarily an improvement over the original code.
It depends on your taste for complexity.
> You have already got answers but here is another. Bash has a spe
* 2021-07-29 21:16:26+0100, mick crane wrote:
>4 ((ct++))
>5 scanimage > /home/mick/DATA/SCANS/scan-$ct.pnm
Items 4 and 5 could be combined using $((++ct)):
scanimage > /home/mick/DATA/SCANS/scan-$((++ct)).pnm
> What's the thing with the ct being in double brackets and not having
>
On Thu, Jul 29, 2021 at 07:38:07PM -0400, kamaraju kusumanchi wrote:
> On Thu, Jul 29, 2021 at 4:23 PM Greg Wooledge wrote:
> >
> > On Thu, Jul 29, 2021 at 09:16:26PM +0100, mick crane wrote:
> > > 4 ((ct++))
> >
> > > What's the thing with the ct being in double brackets and not having the
> >
On Thu, Jul 29, 2021 at 4:23 PM Greg Wooledge wrote:
>
> On Thu, Jul 29, 2021 at 09:16:26PM +0100, mick crane wrote:
> > 4 ((ct++))
>
> > What's the thing with the ct being in double brackets and not having the "$"
> > ?
>
> https://mywiki.wooledge.org/ArithmeticExpression
>
Nice wiki page, Gre
Am 29. Jul, 2021 schwätzte mick crane so:
moin moin nick,
I nicked this off some guy on the internet.
1 #!/bin/bash
2 count_file="scan_count.txt"
3 ct=`cat $count_file`
4 ((ct++))
5 scanimage > /home/mick/DATA/SCANS/scan-$ct.pnm
6 echo $ct > $count_file
What's the thing with the ct being
On Thu, Jul 29, 2021 at 09:16:26PM +0100, mick crane wrote:
> 4 ((ct++))
> What's the thing with the ct being in double brackets and not having the "$"
> ?
https://mywiki.wooledge.org/ArithmeticExpression
I nicked this off some guy on the internet.
1 #!/bin/bash
2 count_file="scan_count.txt"
3 ct=`cat $count_file`
4 ((ct++))
5 scanimage > /home/mick/DATA/SCANS/scan-$ct.pnm
6 echo $ct > $count_file
What's the thing with the ct being in double brackets and not having the
"$" ?
scan_cou
Alfredo Finelli schrieb:
The 'date' command runs in a child process for which the bash shell has
to determine the environment. Parameter assignments are inherited in
that environment (i.e. the 'date' command sees them) in two cases:
either when the variable is not only declared but also expor
On Friday 06 June 2008 12:59, Malte Forkel wrote:
> I recently came across the following example for switching time
> zones:
>
> $ date
> Fr 6. Jun 12:49:30 CEST 2008
> $ TZ=UTC date
> Fr 6. Jun 10:49:35 UTC 2008
>
> Could someone please explain to me the general shell syntax involved
> here? I did
I recently came across the following example for switching time zones:
$ date
Fr 6. Jun 12:49:30 CEST 2008
$ TZ=UTC date
Fr 6. Jun 10:49:35 UTC 2008
Could someone please explain to me the general shell syntax involved here? I
did not know that I could put an assignment and a command on one line
On Sat, 29 Nov 1997, Alan Su wrote:
> Rick Macdonald wrote (Thu, 27 Nov 1997 19:27:13 -0700 (MST) ):
> |>
> |>> Yup, you're right; it's probably a bug. This does work:
> |>>
> |>> ( (ls);(ls))
> |>
> |>> Try changing the definition of the helper in Netscape to follow the
> |>> above syntax.
> |>
On Wed, 26 Nov 1997, Witold Grabysz wrote:
> Remco van de Meent wrote:
>
> > On Mon, 24 Nov 1997, Witold Grabysz wrote:
> >
> > : the following phrase doesn't work in bash:
> > : ((ls);(ls))
> > : Why? Is it not allowed by the shell syntax or there is a bug in it?
> > :
> > : It is a little
On Tue, 25 Nov 1997, Stephen Zander wrote:
> "Eloy A. Paris" wrote:
> > Witold Grabysz <[EMAIL PROTECTED]> wrote:
> >
> > : the following phrase doesn't work in bash:
> > : ((ls);(ls))
> > : Why? Is it not allowed by the shell syntax or there is a bug in it?
> >
> > Yup, you're right; it's proba
> "rick" == Rick Macdonald <[EMAIL PROTECTED]> writes:
rick> Can anybody confirm if this is fixed in bash-2.01?
$ bash -version
GNU bash, version 2.01.0(1)-release (i486-debian-linux-gnu)
Copyright 1996 Free Software Foundation, Inc.
$ ls -l
total 0
-rw--- 1 simkosimko
On 25 Nov 1997, Eloy A. Paris wrote:
> Witold Grabysz <[EMAIL PROTECTED]> wrote:
>
> : the following phrase doesn't work in bash:
> : ((ls);(ls))
> Yup, you're right; it's probably a bug. This does work:
>
> ( (ls);(ls))
Can anybody confirm if this is fixed in bash-2.01?
> Try changing the de
Remco van de Meent wrote:
> On Mon, 24 Nov 1997, Witold Grabysz wrote:
>
> : the following phrase doesn't work in bash:
> : ((ls);(ls))
> : Why? Is it not allowed by the shell syntax or there is a bug in it?
> :
> : It is a little important for me, because it is how the Netscape 4 spawns
> :
"Eloy A. Paris" <[EMAIL PROTECTED]> writes:
> Witold Grabysz <[EMAIL PROTECTED]> wrote:
>
> : the following phrase doesn't work in bash:
> : ((ls);(ls))
> : Why? Is it not allowed by the shell syntax or there is a bug in it?
>
> Yup, you're right; it's probably a bug. This does work:
>
> ( (ls)
"Eloy A. Paris" wrote:
> Witold Grabysz <[EMAIL PROTECTED]> wrote:
>
> : the following phrase doesn't work in bash:
> : ((ls);(ls))
> : Why? Is it not allowed by the shell syntax or there is a bug in it?
>
> Yup, you're right; it's probably a bug. This does work:
>
> ( (ls);(ls))
>
> Try changi
Witold Grabysz <[EMAIL PROTECTED]> wrote:
: the following phrase doesn't work in bash:
: ((ls);(ls))
: Why? Is it not allowed by the shell syntax or there is a bug in it?
Yup, you're right; it's probably a bug. This does work:
( (ls);(ls))
Try changing the definition of the helper in Netscape t
On Mon, 24 Nov 1997, Witold Grabysz wrote:
: the following phrase doesn't work in bash:
: ((ls);(ls))
: Why? Is it not allowed by the shell syntax or there is a bug in it?
:
: It is a little important for me, because it is how the Netscape 4 spawns
: an external helper:
: ((gv temp_file.ps
Hello,
the following phrase doesn't work in bash:
((ls);(ls))
Why? Is it not allowed by the shell syntax or there is a bug in it?
It is a little important for me, because it is how the Netscape 4 spawns
an external helper:
((gv temp_file.ps);(rm temp_file.ps))
In tcsh it works, however I cannot
22 matches
Mail list logo