On Wed May 21, 2025 at 10:09 AM BST, Dan Purgert wrote:
As far as I know namespaces (read: poorly), the backup script would
need to execute setns(2) in order to join the previously created
namespace for your "/backup" target. But, I've only used them with
networking devices, so there may be ot
On Wed May 21, 2025 at 10:05 AM BST, Nicolas George wrote:
Does it mean you like your backup drive to be permanently plugged to
the computer? That protects you from hardware failures and human
mistakes, but not from large physical damage or theft.
This drive is permanently connected to this co
On Wed, May 21, 2025 at 11:38:38AM +0200, Nicolas George wrote:
> to...@tuxteam.de (HE12025-05-21):
> > Actually, this makes a lot of sense (well, nearly): keep backup constantly
> > synced, unmount/mount only on media rotation, carry freshly unmounted
> > medium to safe place.
>
> It only becomes
to...@tuxteam.de (HE12025-05-21):
> Actually, this makes a lot of sense (well, nearly): keep backup constantly
> synced, unmount/mount only on media rotation, carry freshly unmounted
> medium to safe place.
It only becomes an effective backup at the time it is unmounted to move
the medium to the s
On Wed, May 21, 2025 at 11:05:37AM +0200, Nicolas George wrote:
> Jonathan Dowland (HE12025-05-21):
> > I'd like /backup permanently
> > mounted
>
> Does it mean you like your backup drive to be permanently plugged to the
> computer? That protects you from h
Jonathan Dowland (HE12025-05-21):
> I'd like /backup permanently
> mounted
Does it mean you like your backup drive to be permanently plugged to the
computer? That protects you from hardware failures and human mistakes,
but not from large physical damage or
On May 21, 2025, Jonathan Dowland wrote:
> On Tue May 20, 2025 at 3:50 PM BST, Dan Purgert wrote:
> > I used /mnt/backup because I only wanted the partition mounted while the
> > backup was running (it was one of several on that physical drive). The
> > backup script did the mount/rsync/unmount as
On Tue May 20, 2025 at 3:50 PM BST, Dan Purgert wrote:
I used /mnt/backup because I only wanted the partition mounted while
the backup was running (it was one of several on that physical drive).
The backup script did the mount/rsync/unmount as part of the
execution. Really, the only point of th
On Tue, May 20, 2025 at 11:35:14AM -0400, Lee wrote:
> On Tue, May 20, 2025 at 10:08 AM tomas wrote:
> >
> > On Tue, May 20, 2025 at 09:45:11AM -0400, Lee wrote:
> > > On Tue, May 20, 2025 at 9:33 AM wrote:
> >
> > [...]
> >
> > > > What do you do if you get two USBs containing file systems with
>
On Tue, May 20, 2025 at 10:08 AM tomas wrote:
>
> On Tue, May 20, 2025 at 09:45:11AM -0400, Lee wrote:
> > On Tue, May 20, 2025 at 9:33 AM wrote:
>
> [...]
>
> > > What do you do if you get two USBs containing file systems with
> > > the same UUID?
> >
> > Is that possible? I suppose it is.. so I'
On Tue, May 20, 2025 at 10:50:50AM -0400, Dan Purgert wrote:
[...]
> I used /mnt/backup because I only wanted the partition mounted while the
> backup was running (it was one of several on that physical drive). The
> backup script did the mount/rsync/unmount as part of the execution.
> Really, th
On May 20, 2025, Lee wrote:
> On Tue, May 20, 2025 at 6:00 AM Jonathan Dowland wrote:
> >
> > On Tue May 20, 2025 at 6:41 AM BST, Kamil Jońca wrote:
> > > why not
> > > if ! mountpoint /mnt/usb-drive-b ; then ...
> > > ?
> >
> > I'd not heard of either `mountpoint` or `findmnt` before. I see they'
On Tue, May 20, 2025 at 09:45:11AM -0400, Lee wrote:
> On Tue, May 20, 2025 at 9:33 AM wrote:
[...]
> > What do you do if you get two USBs containing file systems with
> > the same UUID?
>
> Is that possible? I suppose it is.. so I'd go looking for how to
> change the UUID for one of the usb dr
On Tue, May 20, 2025 at 9:33 AM wrote:
>
> On Tue, May 20, 2025 at 09:30:37AM -0400, Lee wrote:
> > On Tue, May 20, 2025 at 6:00 AM Jonathan Dowland wrote:
> > >
> > > On Tue May 20, 2025 at 6:41 AM BST, Kamil Jońca wrote:
> > > > why not
> > > > if ! mountpoint /mnt/usb-drive-b ; then ...
> > > >
On Tue, May 20, 2025 at 09:30:37AM -0400, Lee wrote:
> On Tue, May 20, 2025 at 6:00 AM Jonathan Dowland wrote:
> >
> > On Tue May 20, 2025 at 6:41 AM BST, Kamil Jońca wrote:
> > > why not
> > > if ! mountpoint /mnt/usb-drive-b ; then ...
> > > ?
> >
> > I'd not heard of either `mountpoint` or `fin
On Tue, May 20, 2025 at 6:00 AM Jonathan Dowland wrote:
>
> On Tue May 20, 2025 at 6:41 AM BST, Kamil Jońca wrote:
> > why not
> > if ! mountpoint /mnt/usb-drive-b ; then ...
> > ?
>
> I'd not heard of either `mountpoint` or `findmnt` before. I see they're
> both part of util-linux, so I guess as
On Tue May 20, 2025 at 6:41 AM BST, Kamil Jońca wrote:
why not
if ! mountpoint /mnt/usb-drive-b ; then ...
?
I'd not heard of either `mountpoint` or `findmnt` before. I see they're
both part of util-linux, so I guess as likely as each other to be
available (which is one criterion I would use
Andy Smith writes:
> Hi,
>
> On Sun, May 18, 2025 at 12:47:25PM -0400, Default User wrote:
>> Since I know almost no shell scripting, the rsync usb drive A
>> to usb drive B copy is done with a simple bash script consisting
>> only of the rsync backup command, with options and parameters, but
>
On Mon, May 19, 2025 at 3:22 PM Dan Purgert wrote:
>
> On May 19, 2025, Lee wrote:
> > On Sun, May 18, 2025 at 8:03 PM Greg Wooledge wrote:
> > >
> > > On Sun, May 18, 2025 at 19:51:04 -0400, Lee wrote:
> > > > On Sun, May 18, 2025 at 4:51 PM Andy Smith wrote:
> > > > >
> > > > > Hi,
> > > > >
> >
On May 19, 2025, Lee wrote:
> On Sun, May 18, 2025 at 8:03 PM Greg Wooledge wrote:
> >
> > On Sun, May 18, 2025 at 19:51:04 -0400, Lee wrote:
> > > On Sun, May 18, 2025 at 4:51 PM Andy Smith wrote:
> > > >
> > > > Hi,
> > > >
> > > > On Sun, May 18, 2025 at 12:47:25PM -0400, Default User wrote:
> >
On Sun, May 18, 2025 at 8:03 PM Greg Wooledge wrote:
>
> On Sun, May 18, 2025 at 19:51:04 -0400, Lee wrote:
> > On Sun, May 18, 2025 at 4:51 PM Andy Smith wrote:
> > >
> > > Hi,
> > >
> > > On Sun, May 18, 2025 at 12:47:25PM -0400, Default User wrote:
> > > > Since I know almost no shell scripting,
On Sun, May 18, 2025 at 19:51:04 -0400, Lee wrote:
> On Sun, May 18, 2025 at 4:51 PM Andy Smith wrote:
> >
> > Hi,
> >
> > On Sun, May 18, 2025 at 12:47:25PM -0400, Default User wrote:
> > > Since I know almost no shell scripting, the rsync usb drive A
> > > to usb drive B copy is done with a simpl
On Sun, May 18, 2025 at 4:51 PM Andy Smith wrote:
>
> Hi,
>
> On Sun, May 18, 2025 at 12:47:25PM -0400, Default User wrote:
> > Since I know almost no shell scripting, the rsync usb drive A
> > to usb drive B copy is done with a simple bash script consisting
> > only of the rsync backup command, wi
Thanks, Andy!
I'll give it a try.
Hi,
On Sun, May 18, 2025 at 12:47:25PM -0400, Default User wrote:
> Since I know almost no shell scripting, the rsync usb drive A
> to usb drive B copy is done with a simple bash script consisting
> only of the rsync backup command, with options and parameters, but
> without any code to verify t
Hans writes:
> What I am exactly want to do:
>
> I have 5 live-build directories. In each I am starting my own script, which
> is
> setting variables and so on for the individual build and does some other
> things (rennamin and copying the resulted ISO and so on).
So you're asking how to do a
What I am exactly want to do:
I have 5 live-build directories. In each I am starting my own script, which is
setting variables and so on for the individual build and does some other
things (rennamin and copying the resulted ISO and so on).
As each build must be started within the live-build dir
Am 06.09.2024 um 12:25 schrieb Hans:
> Dear list,
>
> I am stuck with a little problem and know no one, whom I can ask. So I allow
> me to ask here.
>
> I have several directories, and in each directory there is a shell script,
> which MUST be started within and from
Hi,
On Fri, Sep 06, 2024 at 07:32:41AM -0400, Greg Wooledge wrote:
> On Fri, Sep 06, 2024 at 11:10:16 +, Andy Smith wrote:
> > Is there a reason not to just make these scripts cd to their own
> > directory so the caller doesn't have to care?
> >
> > cd "$(dirname "$0")"
>
> https://mywiki.wo
Andy Smith (12024-09-06):
> cd "$(dirname "$0")"
… || exit
Regards,
--
Nicolas George
On Fri, Sep 06, 2024 at 11:10:16 +, Andy Smith wrote:
> Is there a reason not to just make these scripts cd to their own
> directory so the caller doesn't have to care?
>
> cd "$(dirname "$0")"
https://mywiki.wooledge.org/BashFAQ/028
On Fri, Sep 06, 2024 at 12:25:11 +0200, Hans wrote:
> I have several directories, and in each directory there is a shell script,
> which MUST be started within and from its path.
I'm not clear on what "within and from its path" means here, but let's
suppose you mean
Hi,
On Fri, Sep 06, 2024 at 12:25:11PM +0200, Hans wrote:
> I have several directories, and in each directory there is a shell script,
> which MUST be started within and from its path.
Is there a reason not to just make these scripts cd to their own
directory so the caller doesn't h
Dear list,
I am stuck with a little problem and know no one, whom I can ask. So I allow
me to ask here.
I have several directories, and in each directory there is a shell script,
which MUST be started within and from its path.
Now I want to edit a "master-shell-script", which I
On 23/10/2023 10:56, David wrote:
Hi, for your info, this convention is specified by POSIX:
https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap08.html
Which says:
Environment variable names used by the utilities in the Shell and
Utilities volume of POSIX.1-2017 consist sol
On Mon, 23 Oct 2023 at 13:25, Eduardo M KALINOWSKI
wrote:
> On 22/10/2023 23:13, Greg Wooledge wrote:
> > 2) All-caps variable name IFL. All-caps variable names are reserved,
> >by convention, for environment variables (e.g. PATH) and special
> >shell variables (e.g. IFS).
> While I don
On Sun, May 14, 2023 at 04:36:03PM +, Andy Smith wrote:
> On Sun, May 14, 2023 at 05:04:50PM +0800, Tom Reed wrote:
> > I know convert it to a perl script and run it under App::Daemon for
> > background jobs.
>
> Having it as a systemd service is a much cleaner solution, whether
> it is shell
Hello,
On Sun, May 14, 2023 at 05:04:50PM +0800, Tom Reed wrote:
> I know convert it to a perl script and run it under App::Daemon for
> background jobs.
Having it as a systemd service is a much cleaner solution, whether
it is shell or Perl or any other language.
The main point of the App::Daemo
stem service as Jeremy Ardley suggests in a different reply.
>
> Exactly:
>
> script > /tmp/script.log 2>&1 &
>
> (adjust paths to taste). For good measure, and if your shell
> has job control, it will output the job number and PID, like
> so:
>
> [1] 15211
>
> (1 is the job number, 15211 is th
On Sun, May 14, 2023 at 12:20:02AM -0700, Will Mengarini wrote:
> * Tom Reed [23-05/14=Sun 14:21 +0800]:
> > I have a long run shell script [...]. Currently the script
> > is running in front-end in shell. How can I run it with
> > the backend way? Can I register i
* Tom Reed [23-05/14=Sun 14:21 +0800]:
> I have a long run shell script [...]. Currently the script
> is running in front-end in shell. How can I run it with
> the backend way? Can I register it as a system service?
Just run 'myScript&' (the trailing '&
On 14/5/23 14:21, Tom Reed wrote:
Currently the script is running in front-end in shell.
How can I run it with the backend way? can I register it as a system service?
sudo nano /etc/systemd/system/myscript.service
[Unit]
Description=My Script
[Service]
ExecStart=/path/to/your/script.sh
[In
Hello list
I have a long run shell script with similar content,
#!/bin/bash
while [ 1 ];do
func1()
func2()
sleep 5
done
Currently the script is running in front-end in shell.
How can I run it with the backend way? can I register it as a system service?
Thanks
On 11/6/22 05:01, Greg Wooledge wrote:
> On Sun, Nov 06, 2022 at 08:50:16PM +0800, jeremy ardley wrote:
>> On 6/11/22 19:38, Thomas Schmitt wrote:
>>> Then unpack the archive files:
>>>
>>> for i in "$archive_dir"/*.afio.bz2
>>> do
>>> # One of:
>>> # afio -ivZ -P bzip2
>> Co
On 2019-10-29 22:38, Vincent Lefevre wrote:
On 2019-10-29 14:32:39 +0900, John Crawley wrote:
A (bash) script wants to put up a GUI (yad) if it can, or otherwise try to
interact with the user on the terminal.
>> ---
loginctl show-session -p Type $XDG_SESSION_ID
and looking for 'Type=x11' or 'T
On 2019-10-29 14:32:39 +0900, John Crawley wrote:
> A (bash) script wants to put up a GUI (yad) if it can, or otherwise try to
> interact with the user on the terminal.
>
> Previously I was using loginctl:
> loginctl show-session -p Type $XDG_SESSION_ID
> and looking for 'Type=x11' or 'Type=waylan
On Tue, Oct 29, 2019 at 02:32:39PM +0900, John Crawley wrote:
> I've replaced the test with
> [[ -n $DISPLAY || -n $WAYLAND_DISPLAY ]] &&
> but environment variables are a bit fragile and I was wondering if there
> might be a better way.
Nope. This is it.
If your user sets the DISPLAY variable
On Tue, Oct 29, 2019 at 02:32:39PM +0900, John Crawley wrote:
> A (bash) script wants to put up a GUI (yad) if it can, or otherwise
> try to interact with the user on the terminal.
>
> Previously I was using loginctl:
> loginctl show-session -p Type $XDG_SESSION_ID
> and looking for 'Type=x11' or
A (bash) script wants to put up a GUI (yad) if it can, or otherwise try
to interact with the user on the terminal.
Previously I was using loginctl:
loginctl show-session -p Type $XDG_SESSION_ID
and looking for 'Type=x11' or 'Type=wayland'
However, if a user logs in on a tty and then runs 'star
On Mon, 6 May 2019 15:16:09 -0500
David Wright wrote:
> On Mon 06 May 2019 at 10:56:47 (-0700), Patrick Bartek wrote:
> > On Mon, 6 May 2019 13:08:05 -0400 Greg Wooledge
> > wrote:
> > > On Mon, May 06, 2019 at 09:41:58AM -0700, Patrick Bartek wrote:
> > > > On Mon, 6 May 2019 10:24:24 -040
On Mon 06 May 2019 at 10:56:47 (-0700), Patrick Bartek wrote:
> On Mon, 6 May 2019 13:08:05 -0400 Greg Wooledge wrote:
> > On Mon, May 06, 2019 at 09:41:58AM -0700, Patrick Bartek wrote:
> > > On Mon, 6 May 2019 10:24:24 -0400 Greg Wooledge
> > > wrote:
> > > > for dir in ab*/; do
> > > >
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256
Greg Wooledge wrote:
> [...]
> You said you had twenty-something directories named ab01, ab02, etc.
> So it should have matched unless you ran it from the wrong place,
> or unless you lied about your directory names.
>
> But nobody would EVER lie abo
On Mon, 6 May 2019 13:08:05 -0400
Greg Wooledge wrote:
> On Mon, May 06, 2019 at 09:41:58AM -0700, Patrick Bartek wrote:
> > On Mon, 6 May 2019 10:24:24 -0400
> > Greg Wooledge wrote:
> > > for dir in ab*/; do
> > > name=${dir%/}
> > > enfuse --output "$name.jpg" --compression=97 "$dir
On Mon, May 06, 2019 at 09:41:58AM -0700, Patrick Bartek wrote:
> On Mon, 6 May 2019 10:24:24 -0400
> Greg Wooledge wrote:
> > for dir in ab*/; do
> > name=${dir%/}
> > enfuse --output "$name.jpg" --compression=97 "$dir"/*.jpg
> > done
>
> Typed in as a single line with a semi-colon at en
On Mon, 6 May 2019 18:12:55 +0200
john doe wrote:
> On 5/6/2019 4:24 PM, Greg Wooledge wrote:
> > On Mon, May 06, 2019 at 06:57:00AM -0700, Patrick Bartek wrote:
> >> I want a script that allows commandline only applications that can't batch
> >> process to batch process. A speciifc example. I
On Mon, 6 May 2019 10:24:24 -0400
Greg Wooledge wrote:
> On Mon, May 06, 2019 at 06:57:00AM -0700, Patrick Bartek wrote:
> > I want a script that allows commandline only applications that can't batch
> > process to batch process. A speciifc example. I will use the app
> > enfuse, an exposure mer
On 5/6/2019 4:24 PM, Greg Wooledge wrote:
> On Mon, May 06, 2019 at 06:57:00AM -0700, Patrick Bartek wrote:
>> I want a script that allows commandline only applications that can't batch
>> process to batch process. A speciifc example. I will use the app
>> enfuse, an exposure merging program, a po
On Mon, May 06, 2019 at 06:57:00AM -0700, Patrick Bartek wrote:
> I want a script that allows commandline only applications that can't batch
> process to batch process. A speciifc example. I will use the app
> enfuse, an exposure merging program, a poor man's HDR.
>
> patrick@Debian9:~/Work$ enfu
On Sat, 4 May 2019 17:54:28 -0700
Will Mengarini wrote:
> * Patrick Bartek [19-05/04=Sa 08:08 -0700]:
> > [...] Perform an operation on files in unique, sequential
> > directories [...] never more than 99 -- usually a lot
> > less. The actual number will vary job to job. [...]
>
> If the se
On Sat, 4 May 2019 15:34:16 -0500
Richard Owlett wrote:
> On 05/04/2019 10:08 AM, Patrick Bartek wrote:
> > Hi! All,
> >
> > Want to create a simple, one liner to type in to automate what I've
> > been doing manually: [*SNIP*]
>
> I think the critical question is,> *WHAT* do you wish to acco
On Sat, 4 May 2019 20:21:03 +0200
john doe wrote:
> On 5/4/2019 5:08 PM, Patrick Bartek wrote:
> > Hi! All,
> >
> > Want to create a simple, one liner to type in to automate what I've
> > been doing manually: Perform an operation on files in unique,
> > sequential directories, save the results of
* Patrick Bartek [19-05/04=Sa 08:08 -0700]:
> [...] Perform an operation on files in unique, sequential
> directories [...] never more than 99 -- usually a lot
> less. The actual number will vary job to job. [...]
If the sequentially-numbered directories already exist:
`man find`
Else:
for
On 05/04/2019 10:08 AM, Patrick Bartek wrote:
Hi! All,
Want to create a simple, one liner to type in to automate what I've
been doing manually: [*SNIP*]
I think the critical question is,> *WHAT* do you wish to accomplish?
On 5/4/2019 5:08 PM, Patrick Bartek wrote:
> Hi! All,
>
> Want to create a simple, one liner to type in to automate what I've
> been doing manually: Perform an operation on files in unique,
> sequential directories, save the results of the operations for each
> directory with a file name of that di
Hi! All,
Want to create a simple, one liner to type in to automate what I've
been doing manually: Perform an operation on files in unique,
sequential directories, save the results of the operations for each
directory with a file name of that directory in the directory the
target directories reside
On Wed, Feb 06, 2019 at 02:22:35PM +0900, John Crawley wrote:
> On 06/02/2019 03.17, ghe wrote:
> > On 2/5/19 9:19 AM, Jude DaShiell wrote:
> > > Have you tried replacing "-" with \45 yet? That's the ascii equivalent
> > > for "-'.
> >
> > Excellent idea. But:
> >
> > root@sbox:~# systemctl unma
On Wed, Feb 06, 2019 at 02:04:54AM -0800, Rusi Mody wrote:
> I seem to be missing something...
> Is -.mount literally a thing?
> Or -- more likely -- are shell's arcane quoting/interpolating rules garbling
> something quite into a "-" unit?
Perhaps you're better off looking into the systemd
co
I seem to be missing something...
Is -.mount literally a thing?
Or -- more likely -- are shell's arcane quoting/interpolating rules garbling
something quite into a "-" unit?
On 06/02/2019 03.17, ghe wrote:
On 2/5/19 9:19 AM, Jude DaShiell wrote:
Have you tried replacing "-" with \45 yet? That's the ascii equivalent
for "-'.
Excellent idea. But:
root@sbox:~# systemctl unmask \45.mount
Unit 45.mount does not exist, proceeding anyway.
(Same with quotes.)
You mi
On 2/5/19 2:05 PM, Greg Wooledge wrote:
>> I still think that that massive effort might have been better spent
>> fixing init. Handling threads, tightening some methods and regulations,
>> tidying up init.d and its buds, [...]
>
> Start here: https://jdebp.eu/FGA/system-5-rc-problems.html
Yup. T
On Tue, Feb 05, 2019 at 02:00:12PM -0700, ghe wrote:
> I still think that that massive effort might have been better spent
> fixing init. Handling threads, tightening some methods and regulations,
> tidying up init.d and its buds, [...]
Start here: https://jdebp.eu/FGA/system-5-rc-problems.html
On 2/5/19 12:01 PM, Greg Wooledge wrote:
>>From man systemctl:
>
>mask NAME...
>Mask one or more units, as specified on the command line. This will
>link these unit files to /dev/null, making it impossible to start
>them. This is a stronger version of d
sts.debian.org
> Subject: Re: shell script problem
> Resent-Date: Tue, 5 Feb 2019 18:18:34 + (UTC)
> Resent-From: debian-user@lists.debian.org
>
> On 2/5/19 9:19 AM, Jude DaShiell wrote:
>
> > Have you tried replacing "-" with \45 yet? That's the ascii
On Tue, Feb 05, 2019 at 11:51:42AM -0700, ghe wrote:
> I'd still like to know what 'mask' means in systemd.
>From man systemctl:
mask NAME...
Mask one or more units, as specified on the command line. This will
link these unit files to /dev/null, making it impossible t
On 2/5/19 9:12 AM, john doe wrote:
> What message
Never mind. It quit complaining. No changes to the scripts. Maybe a
systemd update -- there are several updates to lots of code with testing.
Thanks for the responses.
> In general, ignoring error messages is a recipe for disaster.
You'd think s
On 2/5/2019 7:17 PM, ghe wrote:
> On 2/5/19 9:19 AM, Jude DaShiell wrote:
>
>> Have you tried replacing "-" with \45 yet? That's the ascii equivalent
>> for "-'.
>
> Excellent idea. But:
>
> root@sbox:~# systemctl unmask \45.mount
> Unit 45.mount does not exist, proceeding anyway.
>
> (Same with q
On 2/5/19 9:19 AM, Jude DaShiell wrote:
> Have you tried replacing "-" with \45 yet? That's the ascii equivalent
> for "-'.
Excellent idea. But:
root@sbox:~# systemctl unmask \45.mount
Unit 45.mount does not exist, proceeding anyway.
(Same with quotes.)
--
Glenn English
On 2/5/2019 4:43 PM, ghe wrote:
> Buster
>
> A shell script has begun to throw errors I can't seem to get rid of.
> Didn't used to -- it started in the past few days.
>
> I have access to a couple Internet connections: a slow but extremely
> reliable T1 I'v
Buster
A shell script has begun to throw errors I can't seem to get rid of.
Didn't used to -- it started in the past few days.
I have access to a couple Internet connections: a slow but extremely
reliable T1 I've been with for years, and a Comcast residential cable
WiFi that'
On 31 August 2017 at 04:32, James H. H. Lampert
wrote:
>
> I added a line to echo $SHELL to my debugging log file, and
> that was it: if I ran it from cron, $SHELL was /bin/sh; if I ran it from a
> command line, $SHELL was /bin/bash.
Be careful to correctly understand the purpose of the SHELL env
On 8/31/17, 5:16 AM, Reco wrote:
$ bash -c 'cd foo; echo $?'
bash: line 0: cd: foo: No such file or directory
1
To this:
$ dash -c 'cd foo; echo $?'
dash: 1: cd: can't cd to foo
2
Aha! That's what it was! Thanks!
At any rate, changing the test script's utterly nonspecific shebang
(that, I g
Hi.
On Thu, Aug 31, 2017 at 08:03:51AM -0400, Greg Wooledge wrote:
> On Thu, Aug 31, 2017 at 06:52:28AM +0100, Jonathan de Boyne Pollard wrote:
> > James H. H. Lampert:
> >
> > > Could it be that |cron| is running it an entirely different shell, that
> > > doesn't understand the |if| stat
On Thu, Aug 31, 2017 at 06:52:28AM +0100, Jonathan de Boyne Pollard wrote:
> James H. H. Lampert:
>
> > Could it be that |cron| is running it an entirely different shell, that
> > doesn't understand the |if| statement?
> >
> Despite what others have said, the answer to this question is no. Whils
James H. H. Lampert:
Could it be that |cron| is running it an entirely different shell,
that doesn't understand the |if| statement?
Despite what others have said, the answer to this question is no.
Whilst you /are/ running two different shells, the problem is not the
|if| statement. Both o
On Wed, Aug 30, 2017 at 09:32:37PM +0300, Reco wrote:
> > > #!
>
> A curious shebang.
> > Why would the behavior be any different? Could it be that cron is running it
> > an entirely different shell, that doesn't understand the "if" statement?
>
> Presumably your script runs via /bin/bash in int
On Wed 30 Aug 2017 at 11:07:36 (-0700), James H. H. Lampert wrote:
> Can somebody explain this:
>
> My backup script WILL detect that ExternalHD is not mounted, and
> attempt to mount it, if I run it manually.
>
> But it WON'T do that if it runs in a cron job.
>
> I've isolated the relevant code
A few minutes ago, with respect to my backup script attempting to mount
ExternalHD if run from a command line, but not from cron, I wrote:
Why would the behavior be any different? Could it be that cron is
running it an entirely different shell, that doesn't understand the "if"
statement?
That w
Hi.
On Wed, Aug 30, 2017 at 11:07:36AM -0700, James H. H. Lampert wrote:
> Can somebody explain this:
>
> My backup script WILL detect that ExternalHD is not mounted, and attempt to
> mount it, if I run it manually.
>
> But it WON'T do that if it runs in a cron job.
>
> I've isolated th
Can somebody explain this:
My backup script WILL detect that ExternalHD is not mounted, and attempt
to mount it, if I run it manually.
But it WON'T do that if it runs in a cron job.
I've isolated the relevant code into its own script, added debugging
output, and set it up to run every minute
One of the problems you will have with many (any?) of the solutions
proposed is they rely on the current state of your local apt package
metadata cache. Which is to say, if that is not up-to-date, then you
are only going to get stale information; and you need to be root to
update it.
I would sugge
Hi,
What I have been using for years is a little script to send me (and the
servicedesk) a daily mail:
#!/bin/bash
# MAILREC is space separated
MAILREC="myem...@tio.nl helpd...@tio.nl"
SUBJECT="Upgrade report voor $HOSTNAME"
TMPFILE=/tmp/upgradereport.tmp
# Step 1: update repositories...
apt-ge
On Wed, 2016-11-30 at 17:09 +0200, Martin T wrote:
> I would like to run a cron job which periodically checks if I have
> upgradable packages. One way to do it is probably like this:
What do you want to do with the information once you got it? I ask
because Debian includes some packages to do vari
Martin T writes:
> Hi,
>
> I would like to run a cron job which periodically checks if I have
> upgradable packages. One way to do it is probably like this:
>
> $ apt-get upgrade -s | grep -q "^0 upgraded"
>
> In case exit code is >0, then there are upgradable packages. The
> second solution I ca
On Wed, 30 Nov 2016 17:09:20 +0200
Martin T wrote:
>
> For me the "apt-get upgrade -s | grep -q "^0 upgraded"" seems to be
> the most reasonable solution, but maybe there is even a better way?
>
>
I've found upgrade-system to be useful, and when installed, it sends a
daily email showing its
On 2016-11-30, Martin T wrote:
> Hi,
>
> I would like to run a cron job which periodically checks if I have
> upgradable packages. One way to do it is probably like this:
>
> $ apt-get upgrade -s | grep -q "^0 upgraded"
>
> In case exit code is >0, then there are upgradable packages. The
> second
On Wed, Nov 30, 2016 at 10:13:40AM -0500, Greg Wooledge wrote:
> On Wed, Nov 30, 2016 at 05:09:20PM +0200, Martin T wrote:
> > I would like to run a cron job which periodically checks if I have
> > upgradable packages. One way to do it is probably like this:
> >
> > $ apt-get upgrade -s | grep -q
On Wed, Nov 30, 2016 at 05:09:20PM +0200, Martin T wrote:
> I would like to run a cron job which periodically checks if I have
> upgradable packages. One way to do it is probably like this:
>
> $ apt-get upgrade -s | grep -q "^0 upgraded"
But you have to run apt-get update first, AS root. (Your
Hi,
I would like to run a cron job which periodically checks if I have
upgradable packages. One way to do it is probably like this:
$ apt-get upgrade -s | grep -q "^0 upgraded"
In case exit code is >0, then there are upgradable packages. The
second solution I came up with is:
$ for package in $
On Lu, 22 dec 14, 10:51:26, pe...@easthope.ca wrote:
> This command in a shell script removes unwanted log files.
>
> for i in $( echo *.Log ); do
> /bin/rm $i;
> echo "Removed $i."
> done
>
> In the edge case of no matching files, rm complains.
> /b
On Mon, Dec 22, 2014 at 10:51:26AM -0800, pe...@easthope.ca wrote:
> This command in a shell script removes unwanted log files.
>
> for i in $( echo *.Log ); do
> /bin/rm $i;
> echo "Removed $i."
> done
>
> In the edge case of no matching files, rm c
1 - 100 of 559 matches
Mail list logo