Skip to content

Tag: shell

If not exists, create a folder – Error in makefile

I searched over the internet for a command to create a folder if it doesn’t exist. I found it and put in my makefile When the folder doesn’t exist it’s created correctly. But I get an error if the folder already exists. I don’t get why the command would give an error if the condition […

echo printing working directory files names for no reason

why echo printing the files names ? gives this output but running pacmd list-sinks | grep “index:” in the shell gives * index: 1 index: 2 index: 3 Answer pacmd returns * pattern. In for … in …; do … done loop, the list pattern contains * without any protection. So, bash replace *…

Pipe into a shell/bash script from Web URL

How to download a script from URL, execute it, and pipe something into it – all with one command? I have a shell script to which I can pipe stuff: The script is moved to http://example.com/do-stuff.sh Try to do something like this: but it doesn’t work. Data does not get piped into the script. Ther…

Bash script conversion to fish

I’m trying to convert this script to fish: https://github.com/masahide/OmniSSHAgent/blob/main/hack/ubuntu-bash.setup.sh This is my progress so far: It should be fully converted except that main command substitution in the last function: that raises this error: And I don’t understand how to convert…