Skip to main content
F. Hauri  - Give Up GitHub's user avatar
F. Hauri  - Give Up GitHub's user avatar
F. Hauri  - Give Up GitHub's user avatar
F. Hauri - Give Up GitHub
Consultant
  • Member for 11 years, 9 months
  • Last seen this week
comment
Cron call vs CLI call on Ubuntu
You have to add PATH definition in your script! see: How to get CRON to call in the correct PATHs
comment
How do I prompt for Yes/No/Cancel input in a Linux shell script?
@MyrddinEmrys Maybe because you answered first, then my answwer was posted approx 6 years later, your answer was already the best voted and is THE accepted answer.
comment
Gnu-Parallelization within a shell script
Have a look How I use bash or posix shell for draw a Mandelbrot by parallelizing works on many bc process here: Is bash a programming language? Note; I don't use parellel for parallelizing jobs under shell more sample at end of this.
comment
trigger a foreground app by a script runnning in background (in same tty, linux)
I'ts near impossible to plan having a background task unexpectedly to take precedence over current TTY. Depending on what you're currently doing (editing some file with an editor), this may cause trouble!
comment
sendmail command not able to send mail
Check server logs! ( You may have to end your lines by carriage return: sed 's/^ *//;s/$/\r/;' <<EOF| sendmail -t )
comment
sendmail command not able to send mail
Remove spaces before lines in your header!! Or use something like sed 's/^ *//' <<EOF | sendmail -t
comment
How to remove lines of file content, if has specific trailing string?
Or grep -v "-mobile$" file.txt|xargs Look for xargs about merging lines
comment
How to remove lines of file content, if has specific trailing string?
Uh? echo $(grep -v "-mobile$" file.txt| tr \\n \ )
comment
trigger a foreground app by a script runnning in background (in same tty, linux)
... Then you have concurrence over STDIN between your background task and foreground shell...
comment
(SOLVED) 'realpath' works from bash but not in desktop file
Or something like Exec=/bin/sh -c 'rtl_acars_ng -f 131.550M -D $(realpath ~/.config/rtl_acars_ng/datasets)'
comment
Loading…
comment
How do I directly communicate with socat's child processes that result from forking on a new connection?
@RichardT What's the goal of this? What are you trying to do? Please explain more, what you've tried, what you expected...
comment
how to use custom preview function for fzf command on zsh
If really, you could do something like: sfoo="$(declare -f foo)";sfoo=${sfoo#*\{} sfoo=${sfoo%$'\n\}'};fzf --preview "zsh <(echo '${sfoo%\}}') {}" (Feel free to replace zsh with bash! I've tested this with a more complex function, this work under bash and zsh!)
comment
how to use custom preview function for fzf command on zsh
But from there, you have no advantage of running this as a function over simply running this as a script, ( by replacing foo() { by a shebang at 1st line... and drop last curly brace } at last line. )
comment
Alias/bash function with path as parameter does not execute
because of your echo command in your function.
comment
how to use custom preview function for fzf command on zsh
If so, feel free to upvote my comment (and maybe close/delete the question)
comment
how to use custom preview function for fzf command on zsh
bash and zsh are two differents tools!! This all work under bash, not zsh!
comment
how to use custom preview function for fzf command on zsh
You have to export your function: export -f foo!
1
2 3 4 5
265