Re: shell script problem

2019-02-06 Thread Greg Wooledge
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

Re: shell script problem

2019-02-06 Thread tomas
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

Re: shell script problem

2019-02-06 Thread Rusi Mody
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?

Re: shell script problem

2019-02-05 Thread John Crawley
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

Re: shell script problem

2019-02-05 Thread ghe
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.

Re: shell script problem

2019-02-05 Thread Greg Wooledge
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

Re: shell script problem

2019-02-05 Thread ghe
its all kinds of activation of the unit' -- but it, apparently, encountered a masked unit, notified me, them just went on with the script. I've seen error messages saying ' but going on anyway'. Nothing like that in this case, but it did go on anyway. Apparently. This adventure has made me believe that

Re: shell script problem

2019-02-05 Thread Jude DaShiell
ebian.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 equivalen

Re: shell script problem

2019-02-05 Thread Greg Wooledge
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

Re: shell script problem

2019-02-05 Thread ghe
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

Re: shell script problem

2019-02-05 Thread john doe
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

Re: shell script problem

2019-02-05 Thread ghe
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

Re: shell script problem

2019-02-05 Thread john doe
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've been with for

shell script problem

2019-02-05 Thread ghe
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's odd, but very fast

Re: In een script kunnen zien dat een package kan worden geupdate

2018-10-31 Thread Wouter Verhelst
On Fri, Oct 26, 2018 at 12:57:04PM +0200, Cecil Westerhof wrote: > Ik ben niet iemand van de automatische updates. Maar ik wil wel zo > snel mogelijk weten wanneer er updates voor pakketten zijn. Daarom heb > ik een script isUpgradable.sh waarin o.a. staat: > apt update 2>>

Re: In een script kunnen zien dat een package kan worden geupdate

2018-10-27 Thread Cecil Westerhof
Cecil Westerhof writes: > Ik ben niet iemand van de automatische updates. Maar ik wil wel zo > snel mogelijk weten wanneer er updates voor pakketten zijn. Daarom heb > ik een script isUpgradable.sh waarin o.a. staat: > apt update 2>>${_logfile} | grep --quiet up

Re: Was: In een script kunnen zien dat een package kan worden geupdate

2018-10-27 Thread Cecil Westerhof
Paul van der Vlis writes: > Op 27-10-18 om 13:21 schreef Geert Stappers: > >> Van die vijf berichten is 40% NIET op de mailinglist gekomen. >> >> Op https://lists.debian.org/debian-user-dutch/2018/10/threads.html zijn >> de onderbrekende berichten weergegeven als "Message not available" >> >>

Re: Was: In een script kunnen zien dat een package kan worden geupdate

2018-10-27 Thread Paul van der Vlis
Op 27-10-18 om 13:21 schreef Geert Stappers: > Van die vijf berichten is 40% NIET op de mailinglist gekomen. > > Op https://lists.debian.org/debian-user-dutch/2018/10/threads.html zijn > de onderbrekende berichten weergegeven als "Message not available" > > Mijn advies om een email programma te

Re: In een script kunnen zien dat een package kan worden geupdate

2018-10-27 Thread Paul van der Vlis
Op 27-10-18 om 12:16 schreef Geert Stappers: > On Fri, Oct 26, 2018 at 12:57:04PM +0200, Cecil Westerhof wrote: >> Ik ben niet iemand van de automatische updates. Maar ik wil wel zo >> snel mogelijk weten wanneer er updates voor pakketten zijn. Daarom heb >> ik een script i

Was: In een script kunnen zien dat een package kan worden geupdate

2018-10-27 Thread Geert Stappers
On Fri, Oct 26, 2018 at 03:40:24PM +0200, Paul van der Vlis wrote: > Op 26-10-18 om 14:10 schreef Cecil Westerhof: > > Paul van der Vlis writes: > >> Op 26-10-18 om 13:48 schreef Cecil Westerhof: > >>> Paul van der Vlis writes: Van die vijf berichten is 40% NIET op de mailinglist gekomen. Op

Re: In een script kunnen zien dat een package kan worden geupdate

2018-10-27 Thread Geert Stappers
On Fri, Oct 26, 2018 at 12:57:04PM +0200, Cecil Westerhof wrote: > Ik ben niet iemand van de automatische updates. Maar ik wil wel zo > snel mogelijk weten wanneer er updates voor pakketten zijn. Daarom heb > ik een script isUpgradable.sh waarin o.a. staat: > apt update 2>>

Re: In een script kunnen zien dat een package kan worden geupdate

2018-10-26 Thread Paul van der Vlis
et hoofd gezien. I.p.v. dist-upgrade zal ik upgrade > gebruiken. ;-) Waarom? Ik gebruik altijd dist-upgrade. upgrade is niet erg zinvol, dat geeft niet alle upgrades. > Nu even wachten tot er weer een upgrade mogelijk is om > een goed script in elkaar te draaien. Het is inderdaad lasti

Re: In een script kunnen zien dat een package kan worden geupdate

2018-10-26 Thread Paul van der Vlis
Op 26-10-18 om 13:48 schreef Cecil Westerhof: > Paul van der Vlis writes: >> Je kunt apt-get gebruiken, dat heeft wel een stabiele interface. > > Klopt, maar 'apt-get update' doet alleen een update en geeft niet > terug dat er upgrades mogelijk zijn. Dat is de reden dat ik apt gebruik.

Re: In een script kunnen zien dat een package kan worden geupdate

2018-10-26 Thread Paul van der Vlis
Op 26-10-18 om 12:57 schreef Cecil Westerhof: > Ik ben niet iemand van de automatische updates. Maar ik wil wel zo > snel mogelijk weten wanneer er updates voor pakketten zijn. Daarom heb > ik een script isUpgradable.sh waarin o.a. staat: > apt update 2>>${_logfile} | gre

In een script kunnen zien dat een package kan worden geupdate

2018-10-26 Thread Cecil Westerhof
Ik ben niet iemand van de automatische updates. Maar ik wil wel zo snel mogelijk weten wanneer er updates voor pakketten zijn. Daarom heb ik een script isUpgradable.sh waarin o.a. staat: apt update 2>>${_logfile} | grep --quiet upgraded && apt list --upgradable De redirect van s

Re: Disable and Enable Screensaver via Bash Script

2018-10-17 Thread to...@tuxteam.de
like I could do is: > > #!/bin/bash > xscreensaver-command -exit # causes the xscreensaver process to close > /usr/bin/foo # runs my desired application > xscreensaver # restarts xscreensaver process > > While I think my above script will

Re: Disable and Enable Screensaver via Bash Script

2018-10-17 Thread Matthew Crews
y screen saver. Caffeine indicator > > doesn't work with XFCE as far as I've been able to tell, so if I want to > > temporarily disable the screensaver I need to do so manually, and > > re-enable it manually. > > I'm wondering, is there a way to perform this feature with a bash &

Re: Disable and Enable Screensaver via Bash Script

2018-10-16 Thread Étienne Mollier
). I presently use Xscreensaver for my screen saver. >>> Caffeine indicator doesn't work with XFCE as far as I've >>> been able to tell, so if I want to temporarily disable the >>> screensaver I need to do so manually, and re-enable it >>> manually. >>> &g

Re: Disable and Enable Screensaver via Bash Script

2018-10-16 Thread Cindy-Sue Causey
gt; doesn't work with XFCE as far as I've been able to tell, so if I want to >> temporarily disable the screensaver I need to do so manually, and >> re-enable it manually. >> >> I'm wondering, is there a way to perform this feature with a bash >> script? What I'm looki

Re: Disable and Enable Screensaver via Bash Script

2018-10-16 Thread tomas
l, so if I want to > temporarily disable the screensaver I need to do so manually, and > re-enable it manually. > > I'm wondering, is there a way to perform this feature with a bash > script? What I'm looking for is a bash script that does the following, > in sequence: > > 1

Disable and Enable Screensaver via Bash Script

2018-10-15 Thread Matthew Crews
it manually. I'm wondering, is there a way to perform this feature with a bash script? What I'm looking for is a bash script that does the following, in sequence: 1. Disable Xscreensaver 2. Run a given application 3. When the application closes, re-enable Xscreensaver Any help would be appreciated

Script voor update flashplugin

2018-09-10 Thread Paul van der Vlis
Hoi, Nu ik het toch over DRM heb: ik kwam een leuk script tegen om de flash plugin automatisch te updaten: https://github.com/cybernova/fireflashupdate/ Groet, Paul -- Paul van der Vlis Linux systeembeheer Groningen https://www.vandervlis.nl/

Re: Script para ejecutar un comando en cada directorio

2018-09-05 Thread Antonio Galicia
El 4 de septiembre de 2018, 15:22, Josu Lazkano escribió: > El arbol de directorios sera asi: > > /fotos/ > /fotos/2018-01 - Viaje a noseque/ > /fotos/2018-03 - Cena de amigos/ > /fotos/2018-08 - Verano con la familia/ > > El comando es el siguiente: > > mogrify -delete 1 -format jpg -- *.tif

Re: Script para ejecutar un comando en cada directorio

2018-09-05 Thread julher
> El 4 sept 2018, a las 22:22, Josu Lazkano escribió: > > Buenas, > > Me estoy volviendo loco con un pequeño problema que tengo. > > Tengo que convertir un montón de fotos que tengo ordenados en > directorios. Lo que quiero es ejecutar un script en la raiz de u

Re: Script para ejecutar un comando en cada directorio

2018-09-04 Thread fernando sainz
El día 4 de septiembre de 2018, 22:22, Josu Lazkano escribió: > Buenas, > > Me estoy volviendo loco con un pequeño problema que tengo. > > Tengo que convertir un montón de fotos que tengo ordenados en > directorios. Lo que quiero es ejecutar un script en la raiz de un >

Script para ejecutar un comando en cada directorio

2018-09-04 Thread Josu Lazkano
Buenas, Me estoy volviendo loco con un pequeño problema que tengo. Tengo que convertir un montón de fotos que tengo ordenados en directorios. Lo que quiero es ejecutar un script en la raiz de un directorio, y que se ejecute un comando dentro de cada directorio. El arbol de directorios sera asi

Re: ayuda con script mutt

2018-08-31 Thread Gonzalo Rivero
El vie, 31-08-2018 a las 15:58 -0300, federico montaldo escribió: > Hola list > > Estoy trantando de armar un script para poder borrar el contenido de > un mailarchive con mutt. Cuando ejecuto el script no borra la mima > cantidad pero si lo hago de forma manual si. El script es es

ayuda con script mutt

2018-08-31 Thread federico montaldo
Hola list Estoy trantando de armar un script para poder borrar el contenido de un mailarchive con mutt. Cuando ejecuto el script no borra la mima cantidad pero si lo hago de forma manual si. El script es este: #!/bin/bash # # # Usage: # ~r : DELETE # 1y! : 1 year # 2y! : 2 years # 7d! : 7 days

Re: script bash pour unbound

2018-08-21 Thread Bernard Schoenacker
- Mail original - > De: "Daniel Caillibaud" > À: debian-user-french@lists.debian.org > Envoyé: Mardi 21 Août 2018 19:21:06 > Objet: Re: script bash pour unbound > > Le 18/08/18 à 21:48, Bernard Schoenacker > a > écrit : > > > bonjour, >

Re: script bash pour unbound

2018-08-21 Thread Daniel Caillibaud
Le 18/08/18 à 21:48, Bernard Schoenacker a écrit : > bonjour, > > j'ai pris ce script bash et je n'arrive pas à le déverminer: > > https://blog.mirabellette.eu/index.php?article17/block-advertise-domain-name-with-unbound > > voici le début qui pose problème :

Re: script bash pour unbound

2018-08-19 Thread Petrus MH8
Bonjour, J'utilise actuellement un script un peu différent avec Unbound, pour une finalité anti-pubs équivalente avec une autre source, je pense cependant qu'il est possible de remanier la commande afin d'utiliser ta source si tu préfères... En espérant que ca fonctionne toujours sur la version

script bash pour unbound

2018-08-18 Thread Bernard Schoenacker
bonjour, j'ai pris ce script bash et je n'arrive pas à le déverminer: https://blog.mirabellette.eu/index.php?article17/block-advertise-domain-name-with-unbound voici le début qui pose problème : ARRAY= $(https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews-gambling

Re: wishlist script: “hegemon”: set up bare git mirror farm for all debian sources

2018-08-15 Thread Ian Jackson
Zenaan Harkness writes ("wishlist script: “hegemon”: set up bare git mirror farm for all debian sources"): > git at alioth is coming along very nicely and was a great step > forward for Debian (thank you Ian). Why are you CCing me ? I had nothing to do with alioth or salsa. (May

Re: wishlist script: “hegemon”: set up bare git mirror farm for all debian sources

2018-08-15 Thread Zenaan Harkness
ning rust bucket… > > > “To hegemon, > > and beyond‼” > > > > (And really, who wants Gentoo to beat Debian to the hegemonic finish > line?) > > > On Sun, Jul 01, 2018 at 07:55:01PM +1000, Zenaan Harkness wrote: > > git at al

Re: wishlist script: “hegemon”: set up bare git mirror farm for all debian sources

2018-08-15 Thread Zenaan Harkness
nicely and was a great step > forward for Debian (thank you Ian). > > What would be nice is a script e.g. called say "hegemon" which could > be used to greate a Debian git repo farm locally. > > Why? > > Well, I hold that this would be preferable to adding source

Re: script repos

2018-08-14 Thread Javier Debian
El 13/08/18 a las 05:44, t...@stg.hidro.cu escribió: El 2018-08-13 04:00, t...@stg.hidro.cu escribió: Buenas tardes alguien podría compartir un script para actualizar los repos de debian... > a ver no me exprese bien es un script para descargar los repos de debian... >

Re: script repos

2018-08-13 Thread tony
a ver no me exprese bien es un script para descargar los repos de debian... El 2018-08-13 04:00, t...@stg.hidro.cu escribió: Buenas tardes alguien podría compartir un script para actualizar los repos de debian...

Re: script repos

2018-08-13 Thread Fran Torres
;). Fran. El 13/8/18, t...@stg.hidro.cu escribió: > Buenas tardes alguien podría compartir un script para actualizar los > repos de debian... > >

Re: script repos

2018-08-13 Thread Javier ArgentinaBBAR
El lun., 13 ago. 2018 a las 9:57, escribió: > > Buenas tardes alguien podría compartir un script para actualizar los > repos de debian... > #/bin/bash apt update apt list --upgradable apt dist-upgrade -y apt autoremove --purge -y apt autoclean

script repos

2018-08-13 Thread tony
Buenas tardes alguien podría compartir un script para actualizar los repos de debian...

wishlist script: “hegemon”: set up bare git mirror farm for all debian sources

2018-07-01 Thread Zenaan Harkness
git at alioth is coming along very nicely and was a great step forward for Debian (thank you Ian). What would be nice is a script e.g. called say "hegemon" which could be used to greate a Debian git repo farm locally. Why? Well, I hold that this would be preferable to adding sou

Re: Commande sur l'instence du shell qui appelé un script

2018-06-30 Thread Benoit B
Le 30 juin 2018 à 10:06, Étienne Mollier a écrit : > Bonjour, > > Benoit B : >> Je recherche une méthod générale pour qu'une commande >> s'applique à l'instance du shell qui a lancé le script... > > J'essaie de reformuler : vous voulez que l'exécution d'un script

Re: Commande sur l'instence du shell qui appelé un script

2018-06-30 Thread Étienne Mollier
Bonjour, Benoit B : > Je recherche une méthod générale pour qu'une commande > s'applique à l'instance du shell qui a lancé le script... J'essaie de reformuler : vous voulez que l'exécution d'un script se fasse au sein du shell appelant ce script, un peu comme si les commandes du dit

Commande sur l'instence du shell qui appelé un script

2018-06-29 Thread Benoit B
Bonjour a tous, Si par exemple je place "history -c" dans un script, la commande n'aura pas d'effet sur l'instence du shell qui a appelé le script(puisque le Shebang appelle une autre instance de shell). Ex: Dans un xterm j'appelle monscript $ ./monscript monscript contient #

Re: Portabilité - Sécuriser un fichier de configuration pour un script

2018-03-27 Thread Daniel Caillibaud
la base avec le strict minimum de droits (tu peux par ex ne donner que des droits d'insert sur une table sans droits de lecture ni update). Si c'est trop compliqué ou pas gérable, je ne vois que le fait d'envoyer les infos à ajouter sur le serveur (via rsync+ssh ou une api http authentifiée ou n'impo

Re: hs: petite question script bash

2018-03-27 Thread Daniel Caillibaud
Le 21/03/18 à 20:40, raphael.poite...@gmail.com (Raphaël POITEVIN) a écrit : RP> Pour moi c’est propre ! J'ajouterais quand même un # devrait se trouver au début de tout script bash, pour planter si on # utilise une variable non déclarée set -u et du coup plus loin, un ${1-} p

Portabilité - Sécuriser un fichier de configuration pour un script

2018-03-25 Thread G2PC
Bonjour, J'ai avancé sur le développement d'un script avec Zenity. Je me connecte à une base de données distante pour insérer des données dans différentes tables. J'ai ajouté un fichier de configuration mysql.cnf pour séparer les codes d'accès du script lui même. # Le fichier de configuration

Re: hs: petite question script bash

2018-03-21 Thread Raphaël POITEVIN
Jérémy PREGO writes: > merci pour ça, mais du coup dans le *, je vais devoir mettre mes trois > fonction l'une après l'autre, pour qu'elles soient exécutés, si je > n'entre aucun paramètre. > > si c'est un moyen propre, je vais l'adopter :) Pour moi c’est propre ! --

Re: hs: petite question script bash

2018-03-21 Thread yahoo
>> /esac/ >> >> > merci pour ça, mais du coup dans le *, je vais devoir mettre mes trois > fonction l'une après l'autre, pour qu'elles soient exécutés, si je > n'entre aucun paramètre. > > si c'est un moyen propre, je vais l'adopter :) > > jerem >>

Re: hs: petite question script bash

2018-03-21 Thread Jérémy PREGO
st-ce qu'il exite un moyen simple en bash d'exécuter une partie d'un script en fonction du paramètre $1 et si il y a pas de paramètre, exécuter tout le script ? j'ai bien pensé faire des fonctions et faire une condition genre: if [ $1 == "contenue de $1" ]; then fonction1 fi je suis c

Re: hs: petite question script bash

2018-03-21 Thread yahoo
Bonjour en bash tu peux utiliser case. /case $1 in / /    "")/ /                ton code/ /    ;;/ /    "")/ /        ton code// / /    ;;/ /    *)/ /        si aucune option ou rien qui ne corresponde au choix ci-dessus// / /    ;;/ /esac/ C'est la solution uti

hs: petite question script bash

2018-03-21 Thread Jérémy PREGO
bonjour, est-ce qu'il exite un moyen simple en bash d'exécuter une partie d'un script en fonction du paramètre $1 et si il y a pas de paramètre, exécuter tout le script ? j'ai bien pensé faire des fonctions et faire une condition genre: if [ $1 == "contenue de $1" ]; then foncti

Systemd equivalent to dhclient exit-hooks script

2018-02-28 Thread john doe
Hi, I configure a dhcp interface using systemd-networkd. When a new lease is acquired I need to reload some services. How can I do that? In other words: I'm looking for a systemd equivalent to dhclient exit hooks script. I'm on Debian 9. -- John Doe

Re: Tuer un script après une durée fixe

2018-02-27 Thread Francois Lafont
ement > > [Timer] > OnCalendar=10:00:00 # à 10h le matin >    [Install] > WantedBy=timers.target Faire du script un daemon me semble aussi une très bonne idée. Et pour le coup, on peut sans doute dire beaucoup de choses sur systemd, mais faire d'un petit script (qui ne forke pas

Re: Tuer un script après une durée fixe

2018-02-27 Thread yahoo
ut, >> >>   pour ma part j’exécute mes script avec systemd avec l'option >> RuntimeMaxSec >>   qui permet de définir un temps d’exécution du script avant de la >> tuer (et >>   mit en état d’échec). >> >>   Si cela peut être une solution ? > > C'est en t

Re: Tuer un script après une durée fixe

2018-02-27 Thread steve
Salut, Le 27-02-2018, à 14:48:14 +0100, yahoo a écrit : Salut, pour ma part j’exécute mes script avec systemd avec l'option RuntimeMaxSec qui permet de définir un temps d’exécution du script avant de la tuer (et mit en état d’échec). Si cela peut être une solution ? C'est en tout

Re: Tuer un script après une durée fixe

2018-02-27 Thread steve
Le 27-02-2018, à 14:24:35 +0100, Francois Lafont a écrit : Idées, suggestions ? Je pense que tu devrais mettre le timeout sur la commande à droite du pipe uniquement (ie ffmpeg). Normalement, la commande à gauche du pipe (raspivid) devrait se stopper d'elle-même car elle recevra le signal

Re: Tuer un script après une durée fixe

2018-02-27 Thread Francois Lafont
On 02/27/2018 03:26 PM, Vincent Lefevre wrote: > Mais seulement si elle écrit des données, au cas où elle ne le ferait > pas en permanence. Ah oui exact. Merci pour cette précision importante en effet. -- François Lafont

Re: Tuer un script après une durée fixe

2018-02-27 Thread Vincent Lefevre
On 2018-02-27 14:24:35 +0100, Francois Lafont wrote: > Je pense que tu devrais mettre le timeout sur la commande à droite > du pipe uniquement (ie ffmpeg). Normalement, la commande à gauche > du pipe (raspivid) devrait se stopper d'elle-même car elle recevra > le signal SIGPIPE. Mais seulement si

Re: Tuer un script après une durée fixe

2018-02-27 Thread yahoo
Salut, pour ma part j’exécute mes script avec systemd avec l'option |RuntimeMaxSec| qui permet de définir un temps d’exécution du script avant de la tuer (et mit en état d’échec). Si cela peut être une solution ? Le 27/02/2018 à 10:21, steve a écrit : > Salut, > > Sur un Raspberry

Re: Tuer un script après une durée fixe

2018-02-27 Thread Francois Lafont
Bonjour, On 02/27/2018 10:21 AM, steve wrote: > J'aimerais arrêter ce script après 30 minutes. Pour cela, j'ai trouvé la > commande timeout du paquet coreutils. J'ai donc modifié le script ainsi: > > timeout 30m raspivid [des options] | ffmpeg [d'autres options] > > En test

Re: Tuer un script après une durée fixe

2018-02-27 Thread Jean-Marc
Tue, 27 Feb 2018 13:36:33 +0100 steve écrivait : > Le 27-02-2018, à 11:18:02 +0100, Jean-Marc a écrit : > > >> [...] > >> Idées, suggestions ? > > > >timeout { mes_commandes; } > apparemment, timeout ne prend comme paramètre qu'une commande, pas un bloc de commande. Autre

Re: Tuer un script après une durée fixe

2018-02-27 Thread daniel huhardeaux
Le 27/02/2018 à 10:21, steve a écrit : Salut, Bonjour Sur un Raspberry tournant sous raspbian, j'ai un script du genre #!/bin/sh raspivid [des option] | ffmpeg [d'autres options] (raspivid permet de contrôler une caméra) Le script tourne à l'infini (il permet de streamer une vidéo) Je

Re: Tuer un script après une durée fixe

2018-02-27 Thread steve
le dernier ";" et l'accolade fermante. Ne marche pas, le script continue de tourner. J'ai essayé de mettre un  ; juste avant le pipe, et ça ne marche pas non plus.

Re: Tuer un script après une durée fixe

2018-02-27 Thread Jean-Marc
Tue, 27 Feb 2018 10:21:52 +0100 steve écrivait : > Salut, salut Steve, > [...] > Idées, suggestions ? timeout { mes_commandes; } Attention de bien terminer les commandes par des ";" et de laisser un espace entre le dernier ";" et l'accolade fermante. > > Merci

Tuer un script après une durée fixe

2018-02-27 Thread steve
Salut, Sur un Raspberry tournant sous raspbian, j'ai un script du genre #!/bin/sh raspivid [des option] | ffmpeg [d'autres options] (raspivid permet de contrôler une caméra) Le script tourne à l'infini (il permet de streamer une vidéo) Je lance ce script via une tâche cron. J'aimerais

Re: Lancer un script shell linux lors de la fermeture du terminal, avec la croix

2018-02-21 Thread Basile Starynkevitch
On 02/20/2018 06:48 PM, Raphaël POITEVIN wrote: G2PC <g...@visionduweb.com> writes: Comment lancer un script shell linux lors de la fermeture du terminal, avec la croix. ... ? L’appeler dans .bash_logout ? Moi j'aimerais comprendre pourquoi on veut faire ça. Je n'en vois pas la

Re: Lancer un script shell linux lors de la fermeture du terminal, avec la croix

2018-02-21 Thread Étienne Mollier
On 02/20/2018 06:48 PM, Raphaël POITEVIN wrote: > G2PC <g...@visionduweb.com> writes: > >> Comment lancer un script shell linux lors de la fermeture du terminal, >> avec la croix. ... ? > > L’appeler dans .bash_logout ? > Bonsoir, L'approche est intéressant

Re: Supprimer docker de debian avec un script

2018-02-21 Thread G2PC
Résolu, mais, pas totalement. J'arrive donc a supprimer une clé de dépôt, super ! Par contre, mon test conditionnel ne répond pas à mon attente. Quand je lance la suppression de la clé de dépôt de docker, le message retourné sera toujours OK sur le terminal. Mon script, lui, me retournera

Re: Supprimer docker de debian avec un script

2018-02-20 Thread G2PC
s pas > si je peux le supprimer, sans risque de voir d'autres clés devenir > inactives. > > Dans mon contexte, sur VM, Debian 9.3, je sais parfaitement que je > n'ai que installé Docker qui demande une clé. Ici, je peux tout > supprimer sans crainte. > > J'aimerais toute fois

Re: Lancer un script shell linux lors de la fermeture du terminal, avec la croix

2018-02-20 Thread Raphaël POITEVIN
G2PC <g...@visionduweb.com> writes: > Comment lancer un script shell linux lors de la fermeture du terminal, > avec la croix. ... ? L’appeler dans .bash_logout ? -- Raphaël

Re: Lancer un script shell linux lors de la fermeture du terminal, avec la croix

2018-02-18 Thread G2PC
Le 18/02/2018 à 21:19, Étienne Mollier a écrit : > G2PC, le 2018-02-18 : >> Oui, si je lance le script, un fichier est créé, contenant la >> date. Non, le fichier n'est pas créé lorsque je quitte le >> terminal avec la croix. J'ai tenté de le fermer au bout d'une >>

Re: Lancer un script shell linux lors de la fermeture du terminal, avec la croix

2018-02-18 Thread Étienne Mollier
G2PC, le 2018-02-18 : > Oui, si je lance le script, un fichier est créé, contenant la > date. Non, le fichier n'est pas créé lorsque je quitte le > terminal avec la croix. J'ai tenté de le fermer au bout d'une > minute, mais, la date est ajoutée dans le fichier texte au > lancement

Re: Lancer un script shell linux lors de la fermeture du terminal, avec la croix

2018-02-18 Thread G2PC
Le 18/02/2018 à 19:31, Étienne Mollier a écrit : > last-exit () { > printf '%s\n' "$(date --rfc-2822)" > ~/.lastexit > } > trap last-exit EXIT Bonsoir, et, merci pour le retour. J'ai testé sur ma VM, mais, sans succès. Oui, si je lance le sc

Re: Lancer un script shell linux lors de la fermeture du terminal, avec la croix

2018-02-18 Thread Étienne Mollier
Bonjour, > Comment lancer un script shell linux lors de la fermeture du > terminal, avec la croix. ... ? On peut potentiellement déjà avoir des problèmes dépendant de la façon dont le gestionnaire de fenêtre utilisé ferme les fenêtres avec la croix, s'il y a une croix... :-) Normalement

Lancer un script shell linux lors de la fermeture du terminal, avec la croix

2018-02-18 Thread G2PC
Comment lancer un script shell linux lors de la fermeture du terminal, avec la croix. ... ? J'ai vu sur un forum qu'il serrait question d'utiliser SIGHUP. Je n'ai pas réussi à reproduire l'exemple proposé. ( appel de fonction "a" qui écrit correctement dans un fichier de l

Re: Supprimer docker de debian avec un script

2018-02-14 Thread G2PC
inactives. Dans mon contexte, sur VM, Debian 9.3, je sais parfaitement que je n'ai que installé Docker qui demande une clé. Ici, je peux tout supprimer sans crainte. J'aimerais toute fois que mon script de désinstallation puisse être utilisé de façon plus large, donc, je me demande comment ne pas

Re: Supprimer docker de debian avec un script

2018-02-14 Thread Olivier Bitsch
Hello, Est-ce qu'on parle des clés du dépôts de Docker ? Dans ce cas, je me tournerais vers la commande apt-key list qui permet de lister les clés, et apt-key del pour supprimer la clé voulu. Le 12 février 2018 à 17:02, G2PC <g...@visionduweb.com> a écrit : > Bonjour. > > Je

Supprimer docker de debian avec un script

2018-02-12 Thread G2PC
Bonjour. Je crée un script pour supprimer Docker sur Debian 9. Lors de l'installation de Docker, il faut valider la clé, et, j'avais eu un message qui indiquait que le paquet dirmngr n'est pas installé. Maintenant, je veux supprimer Docker mais je me demande comment sont gérées les clés à

cron : logs sans le nom du script : depuis quand, comment l'avoir de nouveau

2018-01-30 Thread Grégory Bulot
Bonjour, En voulant trouver pourquoi un script ne tournait pas je viens de m'apercevoir que la façon dont cron écrivait dans les logs n'est plus très pratique (pour l'humain que je suis) actuellement j'ai un truc de ce genre : Jan 30 12:05:01 MonServeur CRON[32357]: pam_unix(cron:session

Re: OT: Help with a search and replace script in Perl for a big file with no line breaks

2018-01-27 Thread David Christensen
> On Jan 27, 2018, at 12:58 AM, tomas wrote: > > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > On Fri, Jan 26, 2018 at 03:31:37PM -0800, David Christensen wrote: > > [...] > >> I've "cleaned up" more files than I care to remember. (Perl s/// is the >> road to madness for anything

Re: OT: Help with a search and replace script in Perl for a big file with no line breaks

2018-01-27 Thread tomas
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Fri, Jan 26, 2018 at 03:31:37PM -0800, David Christensen wrote: [...] > I've "cleaned up" more files than I care to remember. (Perl s/// is the > road to madness for anything but the most trivial cases.) I wanted to give > the OP an idea of

Re: OT: Help with a search and replace script in Perl for a big file with no line breaks

2018-01-26 Thread deloptes
David Christensen wrote: > Yes -- I'm such an insensitive ass.  ;-) > nice to meet you :) > > I've "cleaned up" more files than I care to remember.  Lexing, parsing, > and EBFN are the standard computer science tools for tasks such as this. > (Perl s/// is the road to madness for anything

Re: OT: Help with a search and replace script in Perl for a big file with no line breaks

2018-01-26 Thread David Christensen
> On Jan 24, 2018, at 11:40 PM, deloptes wrote: > > David Christensen wrote: > >> I used to subscribe to Perl Beginners, but the administrator got draconian >> about discussing other languages, I dropped, and now I appear to be >> banned: > > The way you are writing, no

Re: OT: Help with a search and replace script in Perl for a big file with no line breaks

2018-01-24 Thread deloptes
David Christensen wrote: > I used to subscribe to Perl Beginners, but the administrator got draconian > about discussing other languages, I dropped, and now I appear to be > banned: > > https://lists.perl.org/list/beginners.html > > >> I've never used Perl, but I'm hoping Perl can do the job

Re: OT: Help with a search and replace script in Perl for a big file with no line breaks

2018-01-24 Thread David Christensen
ch terms (because the keywords and punctuation I will > search on will be plain ASCII), but any UTF-8 characters have to remain > "intact" after the search and replace. > > I'm hoping that I can write a Perl script that may be something like this: > > Code to open a file

Re: OT: Help with a search and replace script in Perl for a big file with no line breaks

2018-01-24 Thread rhkramer
On Wednesday, January 24, 2018 03:21:19 PM to...@tuxteam.de wrote: > On Wed, Jan 24, 2018 at 02:14:42PM -0500, rhkra...@gmail.com wrote: > > This is OT, but I thought I'd start with this list as it is the list that > > I deal with more than any other. If no one here can help, suggestions > > for

Re: OT: Help with a search and replace script in Perl for a big file with no line breaks

2018-01-24 Thread tomas
UTF-8 < your_file > /dev/null or something similar > I'm hoping that I can write a Perl script that may be something like this: > > Code to open a file (which I will need to learn / find) open(my $fh, "<:encoding(UTF-8)", "your_file) (the whole kaboodle in &quo

OT: Help with a search and replace script in Perl for a big file with no line breaks

2018-01-24 Thread rhkramer
and punctuation I will search on will be plain ASCII), but any UTF-8 characters have to remain "intact" after the search and replace. I'm hoping that I can write a Perl script that may be something like this: Code to open a file (which I will need to learn / find) Multiple statements of the form "s//

Re: problème de syntaxe avec un script shell

2018-01-03 Thread Sébastien NOBILI
Bonjour, Le vendredi 29 décembre 2017 à 14:44, Daniel Caillibaud a écrit : > Ça répond pas vraiment à la question, mais je trouve que mettre un pass > sudo dans un script est une très mauvaise idée (ça revient à laisser > traîner un accès root à un user +/- lambda, et à donner l'accès

<    2   3   4   5   6   7   8   9   10   11   >