Thank you all for your warm welcome and answers to my questions.
I'm trying to adapt this script [..] Suspend) ~/.config/i3/i3exit suspend [..] to my new Guix environment, in my first iteration, [..] Suspend) ~/.config/i3/i3exit loginctl suspend [..] replacing prepending loginctl leads to unsuccesful results, for now. I'm puzzled, as long as 'loginctl suspend' is working in the shell , What am i missing ? Thanks, thanks, thanks On 2022-10-04 23:58:05, Olivier Dion via wrote: > On Tue, 04 Oct 2022, Maxim Cournoyer <maxim.courno...@gmail.com> wrote: > > Hi, > > > > Olivier Dion via <help-guix@gnu.org> writes: > > > >> On Tue, 04 Oct 2022, jordi <jord...@librebits.info> wrote: > >>> Hi guixers, > >>> > >>> i'm wondering...for my scripts to work in Guix, instead of > >>> '#! /bin/bash' , > >>> > >> > >> Typically the `sh' program should be a symlinked to `bash' in your > >> system profile. I think it is the case for many distro. If you want it > >> to be bulletproof though for other distros maybe something like that: > >> > >> #!/bin/sh > >> if [ "$(basename $SHELL)" != "bash" ]; then > >> exec bash "$0" "$@" > >> fi > >> > >> echo "hey!" > > > > I prefer the "#!/usr/bin/env bash" shebang; /usr/bin/env is available on > > FHS distribution, and on Guix System, for convenience. You can use if > > for any interpreted script, such as Guile, Python, Perl, etc. > > Only if coreutils is in the profile that would work yes. > > -- > Olivier Dion > oldiob.dev >