/dbf79c52dafd6b26d028c407c7339d1645ad8479 le script Create-RefPerSys.ocaml pour que le module Unix soit chargé
(et seules les distributions Linux m'intéressent)
Comment faire?
Cordialement
Bonjour
Avertissement: je ne connais strictement rien à Ocalm
bien qu'il semble être possible d'installer Ocalm sans Opam
Bonjour la liste
Sur mon système Debian Testing j'ai
% /usr/bin/ocaml --version
The OCaml toplevel, version 4.14.1
Sans utiliser opam je voudrais améliorer dans
https://github.com/RefPerSys/RefPerSys/commit/dbf79c52dafd6b26d028c407c7339d1645ad8479
le script Create-RefPerSys.ocaml
On Tue, May 14, 2024 at 02:51:17PM +0200, Mario Marietto wrote:
> I've installed the Cloudflare gateway on Debian as a vm because I can't do
> it directly in FreeBSD. But I want to be covered even when I use FreeBSD.
> The script that I wrote forward the Cloudflare "VPN" from
I've installed the Cloudflare gateway on Debian as a vm because I can't do
it directly in FreeBSD. But I want to be covered even when I use FreeBSD.
The script that I wrote forward the Cloudflare "VPN" from Debian to
FreeBSD,so from outside my IP will be cloudFlared.
On Tue, May 14, 20
On Tue, May 14, 2024 at 01:10:05PM +0200, Mario Marietto wrote:
> Your answer does not help me to understand how to use a "structured
> programming / if , while, for, functions" for the specific task that I want
> to achieve.
What task is that?
a modern way, for creating my script ?
> Why
> > did I feel so comfortable by recreating the 1960s GOTO statement in Bash
> ?
>
> I have absolutely no clue what you're trying to do or why you're trying
> to do it, but I *promise* you, whatever you think you're doing, you
>
On Tue, May 14, 2024 at 08:09:18AM +0200, Mario Marietto wrote:
> Nobody can show a different way,a modern way, for creating my script ? Why
> did I feel so comfortable by recreating the 1960s GOTO statement in Bash ?
I have absolutely no clue what you're trying to do or why you're trying
On Tue, May 14, 2024 at 04:54:26PM +0800, Bret Busby wrote:
>
> Wasn't sudo echo the name of a pop group?
>
> :)
If it wasn't it should've been one.
Cheers
--
t
signature.asc
Description: PGP signature
Wasn't sudo echo the name of a pop group?
:)
Bret Busby
Armadale
Western Australia
(UTC+0800)
.
On Tue, May 14, 2024 at 08:09:18AM +0200, Mario Marietto wrote:
> Nobody can show a different way,a modern way, for creating my script ? Why
> did I feel so comfortable by recreating the 1960s GOTO statement in Bash ?
I think your style is too alien to most of the people here to
make the
Nobody can show a different way,a modern way, for creating my script ? Why
did I feel so comfortable by recreating the 1960s GOTO statement in Bash ?
On Mon, May 13, 2024 at 6:30 PM Will Mengarini wrote:
> Nobody has yet applauded this glorious implementation
> of the 1960s GOTO sta
On Mon, May 13, 2024 at 08:37:16PM +0200, Erwan David wrote:
> Le 13/05/2024 à 19:45, Stefan Monnier a écrit :
[...]
> > % sudo zsh -l
> > # echo 1 > /proc/sys/net/ipv4/ip_forward
> > # ^D
> > logout
> > %
> >
> >
> >
> >
> > Stefan
> >
> >
> sudo -i will
t; > >
> > > > Sorry, dumb question: Depending of the shell, the user is using
> (let's
> > > say, he
> > > > will use bash), can the script not be added into ~/.bashrc?
> > >
> > > The context has been snipped out. The context for this was "
y 13, 2024 at 07:36:07AM +0200, Richard wrote:
> > > > > .profile
> > >
> > > Sorry, dumb question: Depending of the shell, the user is using (let's
> > say, he
> > > will use bash), can the script not be added into ~/.bashrc?
> >
> > The conte
file
> >
> > Sorry, dumb question: Depending of the shell, the user is using (let's
> say, he
> > will use bash), can the script not be added into ~/.bashrc?
>
> The context has been snipped out. The context for this was "OP is trying
> to run a command when root l
,
> he
> will use bash), can the script not be added into ~/.bashrc?
The context has been snipped out. The context for this was "OP is trying
to run a command when root logs in". The method of login was not stated.
First responder said ".profile works for every met
Le 13/05/2024 à 19:45, Stefan Monnier a écrit :
$ su -
Password:
# echo 1 > /proc/sys/net/ipv4/ip_forward
# ^D
logout
$
I don't need no stinkin' sudo :-)
And if you only have `sudo`, but not the root password, of course:
% sudo zsh -l
# echo 1 > /proc/sys/net/ipv4/ip_forward
#
On Mon, May 13, 2024 at 01:45:40PM -0400, Stefan Monnier wrote:
> > $ su -
> > Password:
> > # echo 1 > /proc/sys/net/ipv4/ip_forward
> > # ^D
> > logout
> > $
> >
> > I don't need no stinkin' sudo :-)
>
> And if you only have `sudo`, but not the root password, of course:
>
> % sudo zsh -l
>
> $ su -
> Password:
> # echo 1 > /proc/sys/net/ipv4/ip_forward
> # ^D
> logout
> $
>
> I don't need no stinkin' sudo :-)
And if you only have `sudo`, but not the root password, of course:
% sudo zsh -l
# echo 1 > /proc/sys/net/ipv4/ip_forward
# ^D
logout
%
On 5/13/24 18:52, to...@tuxteam.de wrote:
Now share your ideas :-)
$ su -
Password:
# echo 1 > /proc/sys/net/ipv4/ip_forward
# ^D
logout
$
I don't need no stinkin' sudo :-)
regards,
chris
>> If yes, second dumb question: Coiuld it be ANY script or command?
>> (also running as non-rootuser, like adding "runuser -u myuser
>> command_whatever").
>Root can do this, yes.
Or to be more precise, .bashrc (and any file that's read from it like
.bash_aliases
I think I have found my way,adding this line to /etc/sudoers :
marietto ALL=(ALL) NOPASSWD: /usr/bin/iptables
and on the warp script :
sudo /usr/bin/iptables -A POSTROUTING -t nat -s 192.168.1.5 -j MASQUERADE
On Mon, May 13, 2024 at 3:20 PM wrote:
> On Mon, May 13, 2024 at 09:17:31AM -0
Since this happens so often, I'm trying to offer a recap.
As others have noted, the above
sudo echo 1 > /proc/sys/net/ipv4/ip_forward
won't work, since it runs echo under sudo, but the file opening
(that pesky ">") happens in your shell, which is probably running
unprivileged (otherwise, what
md"
> exit
> }
Anyway, Marietto, you've got two typi:
> mid :
That should be "mid:".
> jump foo
That should be "jumpto foo".
Once you've got your root-login script working, I hope you
move on to implementing a complete open-source PL/I compiler.
Mario Marietto writes:
> There is still a problem. If I login automatically as user and inside
> the script I do this :
>
> sudo iptables -A POSTROUTING -t nat -s 192.168.1.5 -j MASQUERADE
>
> it asks me for the password (don't know why it didn't before) but I
> can't iss
I don't have those typos in the code. The typo has been to copy the content
of the script by hand on the email message.
On Mon, May 13, 2024 at 6:30 PM Will Mengarini wrote:
> Nobody has yet applauded this glorious implementation
> of the 1960s GOTO statement in *Bash*?!
>
> * Ma
,
> he
> will use bash), can the script not be added into ~/.bashrc?
Yes. Consult your shell's manual. And it will also depend on whether
it is considered to be a "login shell". And on a couple of other
factors.
> If yes, second dumb question: Coiuld it be ANY script or comm
Am Montag, 13. Mai 2024, 13:24:17 CEST schrieb Greg Wooledge:
> On Mon, May 13, 2024 at 07:36:07AM +0200, Richard wrote:
> > .profile
Sorry, dumb question: Depending of the shell, the user is using (let's say, he
will use bash), can the script not be added into ~/.bashrc?
If yes, se
problem. If I login automatically as user and inside the
> script I do this :
>
> sudo iptables -A POSTROUTING -t nat -s 192.168.1.5 -j MASQUERADE
>
> it asks me for the password (don't know why it didn't before) but I can't
> issue a password,because the script inside the vm should
There is still a problem. If I login automatically as user and inside the
script I do this :
sudo iptables -A POSTROUTING -t nat -s 192.168.1.5 -j MASQUERADE
it asks me for the password (don't know why it didn't before) but I can't
issue a password,because the script inside the vm should work
> You don't need to, but I definitely think he does.
^^
[ Oh, bias, when will you leave me alone? ]
Stefan
for until and for. Sorry for that,but I'm not an experienced coder. I try
to do my best with what I find on the Internet. I can adapt an already good
enough solution to fit my needs,but I'm not able to write a script from
scratch. It is also true that I found it good because it reminded me of my
old
>> > echo 1 > /proc/sys/net/ipv4/ip_forward
>> This doesn't sound right. Maybe you should investigate why you're
> No need to “investigate”, the answer is obvious: in
You don't need to, but I definitely think he does.
Stefan
Mario Marietto (12024-05-13):
> The command iptables -A POSTROUTING -t nat -s 192.168.1.5 -j MASQUERADE
> doesn't work if invoked as a user,it says "you must be root". So,as
> user,the script seems to be working fine like this :
>
> function jumpto
> {
>
On Mon, May 13, 2024 at 09:17:31AM -0400, Greg Wooledge wrote:
> On Mon, May 13, 2024 at 02:03:59PM +0100, Richmond wrote:
> > >> sudo xterm -e "echo 1 > hello"
>
> > Yes, but why did it allow me to delete the file? I was not root
> > then. Try it.
>
> Because you have write permission on the
Le 13/05/2024 à 15:03, Richmond a écrit :
Erwan David writes:
Le 13/05/2024 à 14:36, Richmond a écrit :
I was experimenting, and found this works:
sudo xterm -e "echo 1 > hello"
It created a file owned by root. But I found I was able to remove it
without being root even though group and
On Mon, May 13, 2024 at 02:03:59PM +0100, Richmond wrote:
> >> sudo xterm -e "echo 1 > hello"
> Yes, but why did it allow me to delete the file? I was not root
> then. Try it.
Because you have write permission on the *directory* that the file is in.
Removing (unlinking) a file is an operation
The command iptables -A POSTROUTING -t nat -s 192.168.1.5 -j MASQUERADE
doesn't work if invoked as a user,it says "you must be root". So,as
user,the script seems to be working fine like this :
function jumpto
{
label=$1
cmd=$(sed -n "/$label:/{:a;n;p;ba}
Richmond (12024-05-13):
> sudo bash -c "echo 1 > hello"
Use sh for that.
Regards,
--
Nicolas George
Erwan David writes:
> Le 13/05/2024 à 14:36, Richmond a écrit :
>> I was experimenting, and found this works:
>>
>> sudo xterm -e "echo 1 > hello"
>>
>> It created a file owned by root. But I found I was able to remove it
>> without being root even though group and world permissions were read
>>
writes:
> On Mon, May 13, 2024 at 01:36:23PM +0100, Richmond wrote:
>> I was experimenting, and found this works:
>>
>> sudo xterm -e "echo 1 > hello"
>
> That's like slicing your morning baguette with the chainsaw.
I do that too.
>
> But if it works for you... hey :-)
>
> Cheers
This also
Richmond wrote:
> I was experimenting, and found this works:
>
> sudo xterm -e "echo 1 > hello"
>
> It created a file owned by root. But I found I was able to remove it
> without being root even though group and world permissions were read
> only.
The owner of a directory can delete any file
On Mon, May 13, 2024 at 02:53:18PM +0200, Nicolas George wrote:
> to...@tuxteam.de (12024-05-13):
> > That's like slicing your morning baguette with the chainsaw.
>
> Worse than that, it will only work from an X11 environment. Certainly
> not at boot.
The analogy to that would be that not many
to...@tuxteam.de (12024-05-13):
> That's like slicing your morning baguette with the chainsaw.
Worse than that, it will only work from an X11 environment. Certainly
not at boot.
Regards,
--
Nicolas George
On Mon, May 13, 2024 at 01:36:23PM +0100, Richmond wrote:
> I was experimenting, and found this works:
>
> sudo xterm -e "echo 1 > hello"
That's like slicing your morning baguette with the chainsaw.
But if it works for you... hey :-)
Cheers
--
t
signature.asc
Description: PGP signature
Le 13/05/2024 à 14:36, Richmond a écrit :
I was experimenting, and found this works:
sudo xterm -e "echo 1 > hello"
It created a file owned by root. But I found I was able to remove it
without being root even though group and world permissions were read
only.
thats because sudo exceutes a
I was experimenting, and found this works:
sudo xterm -e "echo 1 > hello"
It created a file owned by root. But I found I was able to remove it
without being root even though group and world permissions were read
only.
Dan Ritter (12024-05-13):
> Mario Marietto wrote:> If you run
>
> sudo echo 1 > /proc/sys/net/ipv4/ip_forward
>
> then the shell you are running it from will run "sudo echo 1"
> and then try to put the output in that file.
Other way around: the shell first tries to redirect the output to the
e sudo.
If you run
sudo echo 1 > /proc/sys/net/ipv4/ip_forward
then the shell you are running it from will run "sudo echo 1"
and then try to put the output in that file. That fails because
the running process is owned by you, not root.
If you put the echo command into a script, and then run the
script with sudo, this will work.
-dsr-
then
Stefan Monnier (12024-05-13):
> > echo 1 > /proc/sys/net/ipv4/ip_forward
> >
> > work only if I'm root. It does not work using sudo.
> This doesn't sound right. Maybe you should investigate why you're
> seeing this behavior, rather than work around the problem.
>
> `sudo` *is* root.
No need to
> echo 1 > /proc/sys/net/ipv4/ip_forward
>
> work only if I'm root. It does not work using sudo.
This doesn't sound right. Maybe you should investigate why you're
seeing this behavior, rather than work around the problem.
`sudo` *is* root.
Stefan
On Mon, May 13, 2024 at 01:48:25PM +0200, Mario Marietto wrote:
> I wouldn't to login as root automatically,but I've realized that this
> command :
>
> echo 1 > /proc/sys/net/ipv4/ip_forward
>
> work only if I'm root. It does not work using sudo. So,in the end I've
> chosen to be root instead of
Le 13/05/2024 à 13:48, Mario Marietto a écrit :
--> If they only want this thing to happen when root logs in directly
on a console or ssh, then .profile may indeed be the correct answer.
Yes,I don't need to run xorg and a desktop environment,since warp-cli
disconnect and warp-cli connect do
--> If they only want this thing to happen when root logs in directly on a
console or ssh, then .profile may indeed be the correct answer.
Yes,I don't need to run xorg and a desktop environment,since warp-cli
disconnect and warp-cli connect do not require them.
I wouldn't to login as root
Hello to everyone,
Richard,thanks. I've launched the script inside the .profile file that's
inside the root folder and it worked. Thank you.
Plan B : From time to time the cloudflare connection stops working,so there
is the needing to repeat these commands :
warp-cli disconnect
warp-cli connect
On Mon, May 13, 2024 at 07:36:07AM +0200, Richard wrote:
> .profile
> will always be read as soon as the user logs in, no matter how. Through a
> terminal, a GUI, doesn't matter.
That's not correct. There are many different GUI login setups where
the .profile is never read.
That said, since
Should be as easy as executing the script from the .profile of root - that
means if "log in as root" actually means root, not just sudo'ing. .profile
will always be read as soon as the user logs in, no matter how. Through a
terminal, a GUI, doesn't matter. No idea if doing this throu
On Sun 12/05/2024 at 22:52, Mario Marietto wrote:
> I want that the warp script is run everytime root is logged in,not more,not
> less.
The second half of this seems to do what you want
https://stackoverflow.com/a/39024841
Hello to everyone.
I'm using Debian 12. I'm configuring a little Debian 12 vm with qemu that I
will use to forward the cloudflare connection to FreeBD.
What I want to do is to run the script below as soon as root has logged in.
I've configured the automatic login of root adding to this service
ractically un-googleable name
it is very nice, and does a lot with very little code. So far, so good.
But:
If I write a Python script with this module, and expose it to the
internet via SSH, will hell break loose? So far I've done the
following:
1. Put my script in /usr/local/bin/turtle (the
Hello fellow Debianites!
I want do do a custom CLI for a project, and I am quite happy with the
Python cmd module. Aside from having a practically un-googleable name
it is very nice, and does a lot with very little code. So far, so good.
But:
If I write a Python script with this module
Bonjour,
Le 2024-02-05 16:07, Daniel Caillibaud a écrit :
Oui, et je vous encourage à passer vos shell bash à shellcheck, il
signale ce genre d'erreur
(et plein d'autres).
Il est parfois un peut trop zélé, mais on peut lui dire qu'on sait ce
qu'on fait avec du
# shellcheck disable=SC
Le 02/02/24 à 08:54, Jérémy Prego a écrit :
> Pour éviter ce problème, on peut mettre les variables entre "
>
> du coup, ça donnerai:
>
> pdftk "$fichier1" stamp "$tampon" output "$fichier2"
Oui, et je vous encourage à passer vos shell bash à shellcheck, il signale ce
genre d'erreur
(et plein
On Mon 05/02/2024 at 00:45, Greg Wooledge wrote:
...
> If you're one of these "I want every command I ever run to be in my
> shell history, retained forever, and I don't care how much space it
> takes" people, then there are web pages out there that can help you.
> I don't follow that philosophy
(Re)posting the below as requested, and can confirm
history -r
seems to have the desired effect.
Thanks.
- Original message -
From: Will Mengarini
To: Gareth Evans
Cc: debian-user@lists.debian.org
Subject: Re: script/history
Date: Monday, 5 February 2024 01:02
* Gareth Evans [24
* Gareth Evans [24-02/04=Su 09:46 +]:
> Re the script command, does anyone know of a way to make
> commands run during a script session appear in bash history too?
You want the 'history -r' command, "explained" by `help history`.
After you end the script, you're back in t
On Mon, Feb 05, 2024 at 12:28:38AM +, Gareth Evans wrote:
> I was trying to view the history of commands run during a script session.
>
> user@qwerty:~$ script foo
> Script started, output log file is 'foo'.
> user@qwerty:~$ date
> Mon 5 Feb 00:21:16 GMT 2024
> user@
y, the 4.4BSD csh)". It
> appears that bash supports it syntactically, but not its semantics.
> I'm not sure why you mentioned this shell detail specifically.
I was just highlighting a way to see if behaviour differs between bash "proper"
and script running in bash.
On Sun 04/02/2024 at 17:33, Greg Wooledge wrote:
...
> The script(1) utility has NOTHING to do with running ordinary shell
> scripts.
I understand that.
I was trying to view the history of commands run during a script session.
user@qwerty:~$ script foo
Script started, output log file i
On Sun, Feb 04, 2024 at 01:45:27PM -0600, David Wright wrote:
> SCRIPT(1) User Commands SCRIPT(1)
> [ … ]
> HISTORY
> The script command appeared in 3.0BSD.
>
> I have no idea why "the history mechanism" is even mentioned
On Sun 04 Feb 2024 at 16:01:29 (+), Gareth Evans wrote:
> On Sun 04/02/2024 at 13:24, Max Nikulin wrote:
> > On 04/02/2024 16:46, Gareth Evans wrote:
> >> Re the script command, does anyone know of a way [ … ]
> > [...]
> >> man script says
> &
On Sun, Feb 04, 2024 at 04:01:29PM +, Gareth Evans wrote:
> It seemed to me initially (as I should perhaps have stated) that man script
> was suggesting that csh was a component or depedency (of script), which
> seemed to be contradicted by it not being installed. On reflection,
&
On Sun 04/02/2024 at 13:24, Max Nikulin wrote:
> On 04/02/2024 16:46, Gareth Evans wrote:
>> Re the script command, does anyone know of a way to make commands run during
>> a script session appear in bash history too?
> [...]
>> man script says
>>
>> "SE
Oh you're right, I entirely overlooked the usage of 'script' and
didn't understand the question right, sorry.
On Sun, 2024-02-04 at 06:28 -0500, Michael Grant wrote:
> > $ script foo.txt
> > Script started, output log file is 'foo.txt'.
> > $ date
> > Sun 4 Feb 09:4
On 04/02/2024 16:46, Gareth Evans wrote:
Re the script command, does anyone know of a way to make commands run during a
script session appear in bash history too?
[...]
man script says
"SEE ALSO
csh(1) (for the history mechanism)"
but
$ man csh
No manual entry for csh
On Sun, Feb 04, 2024 at 09:46:09AM +, Gareth Evans wrote:
> man script says
>
> "SEE ALSO
>csh(1) (for the history mechanism)"
>
> but
>
> $ man csh
> No manual entry for csh
I'm so glad that we're entering an era where it's normal *not* to hav
> $ script foo.txt
> Script started, output log file is 'foo.txt'.
> $ date
> Sun 4 Feb 09:44:00 GMT 2024
> $ exit
> exit
> Script done.
> $ history|tail -n2
> 30797 2024-02-04 09:43:57 script foo.txt
> 30798 2024-02-04 09:44:21 history|tail -n2
>
> I di
On Sun, 2024-02-04 at 09:46 +, Gareth Evans wrote:
> Re the script command, does anyone know of a way to make commands
> run during a script session appear in bash history too?
Maybe this:
https://serverfault.com/questions/16204/how-to-make-bash-scripts-print-out-every-command-
Re the script command, does anyone know of a way to make commands run during a
script session appear in bash history too?
$ script foo.txt
Script started, output log file is 'foo.txt'.
$ date
Sun 4 Feb 09:44:00 GMT 2024
$ exit
exit
Script done.
$ history|tail -n2
30797 2024-02-04 09:43:57
NomFic comme un seul paramètre envoyé à Cmd avec ses blancs.
Après il faut savoir comment la commande Cmd va traiter tout ça…
> Le 2 févr. 2024 à 07:51, Informatique BILLARD
> a écrit :
>
> Bonjour
>
> j'ai écrit un petit script qui lance à la fin cette commande :
>
> pd
Effectivement François
Merci d'avoir rectifié.
Erwann
Le 02/02/2024 à 13:09, François TOURDE a écrit :
Le 19755ième jour après Epoch,
Erwann Le Bras écrivait:
Éviter les boucles "for" avec listes de fichiers (for f in `ls
"$dir"`) ou (for f in *), les espaces sont mal interprétés.
Ça
Le 19755ième jour après Epoch,
Erwann Le Bras écrivait:
> Éviter les boucles "for" avec listes de fichiers (for f in `ls
> "$dir"`) ou (for f in *), les espaces sont mal interprétés.
Ça marche très bien l'utilisation avec for f in *, si tu prends soin
d'utiliser "$f" plutôt que juste $f
Par
uot; avec listes de fichiers (for f in `ls "$dir"`)
ou (for f in *), les espaces sont mal interprétés.
À la place utiliser "find" : find "$dir" -name "${fichier}*" -exec
c'est à peu près tout.
Erwann
Le 02/02/2024 à 08:41, Informatique BILLARD a écrit :
merci je ne connaissais pas cet outils
François-Marie
Le 02/02/2024 à 09:54, Klaus Becker a écrit :
Detox est ton ami
Klaus
Bon
j'ai tourné le problème dans tous les sens et finalement j'ai opté pour
ceci
1. le nom du fichier passé comme argument au script est traité pour
remplacer les espaces par des underscore.
2. je fait un renommage de ce fichier avec le nom sans espaces.
3. Puis traitement et tout
Detox est ton ami
Klaus
Le 02/02/2024 à 08:48, Basile Starynkevitch a écrit :
On 2/2/24 08:41, Informatique BILLARD wrote:
Bonjour
j'ai écrit un petit script qui lance à la fin cette commande :
pdftk $fichier1 stamp $tampon output $fichier2
avec $fichier1 et $tampon, $fichier2 sont construit à partir des
Bonjour
j'ai écrit un petit script qui lance à la fin cette commande :
pdftk $fichier1 stamp $tampon output $fichier2
avec $fichier1 et $tampon, $fichier2 sont construit à partir des
paramètres fournis au script .
Mais je rencontre un problème quand il y a un espace dans le nom de
fichier
Bjr,
> tampon=/user/Document/cachet\ pdf
et
tampon="/user/Document/cachet\ pdf"
(utiliser des double quote
??
++
bonjour,
Le 02/02/2024 à 08:41, Informatique BILLARD a écrit :
Bonjour
j'ai écrit un petit script qui lance à la fin cette commande :
pdftk $fichier1 stamp $tampon output $fichier2
Pour éviter ce problème, on peut mettre les variables entre "
du coup, ça donnerai:
pdftk "
On 2/2/24 08:41, Informatique BILLARD wrote:
Bonjour
j'ai écrit un petit script qui lance à la fin cette commande :
pdftk $fichier1 stamp $tampon output $fichier2
avec $fichier1 et $tampon, $fichier2 sont construit à partir des
paramètres fournis au script .
Mais je rencontre un
Bonjour
j'ai écrit un petit script qui lance à la fin cette commande :
pdftk $fichier1 stamp $tampon output $fichier2
avec $fichier1 et $tampon, $fichier2 sont construit à partir des
paramètres fournis au script .
Mais je rencontre un problème quand il y a un espace dans le nom de
fichier
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
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
Le 2023-10-12 14:20, Fabrice Delvallée a écrit :
J'ai pas encore testé le service. Je suis novice en systemd
et je ne sais pas non plus demandé a udev de monter la clé :)
Voilà le contenu du fichier `/etc/systemd/system/backup.service`
```
[Unit]
Description=Backup
[Service]
Type=oneshot
On 12/10/2023 11:38, Sébastien NOBILI wrote:
Le 2023-10-12 11:06, Erwann Le Bras a écrit :
Le 12/10/2023 à 09:06, fabrice a écrit :
Le montage automatique de la clé s’effectue après l’exécution de la
règle udev, même si je tente une commande mount dans le script,
/dev/sdd n’est pas
Le 2023-10-12 11:06, Erwann Le Bras a écrit :
Le 12/10/2023 à 09:06, fabrice a écrit :
Le montage automatique de la clé s’effectue après l’exécution de la
règle udev, même si je tente une commande mount dans le script,
/dev/sdd n’est pas encore disponible.
Une simple boucle d'attente
Le 12/10/2023 à 09:06, fabrice a écrit :
Le montage automatique de la clé s’effectue après l’exécution de la
règle udev, même si je tente une commande mount dans le script,
/dev/sdd n’est pas encore disponible.
Une simple boucle d'attente?
do
sleep 5
while ! [ -d /dev/sdd]
ou
Bonjour,
Le 2023-10-12 09:06, fabrice a écrit :
Le montage automatique de la clé s’effectue après l’exécution de la
règle udev, même si je tente une commande mount dans le script,
/dev/sdd n’est pas encore disponible.
Comment faire pour lancer la règle udev âpres que la cle soit monté
r/local/bin/scanusb.sh %k'"
rechargé udev
|udevadm control --reload-rules|
La commande « udevadm test /dev/sdd » affiche bien « run: '/bin/bash -c
'/usr/local/bin/scanusb.sh sdd'' »
le script scanusb.sh contient :
#!/bin/bash
FILE="usb_scan.log"
echo "** Scan - USB
1 - 100 of 10718 matches
Mail list logo