Skip to content

Makefile : No rule to make target

I have a problem with Makefile. It should compile a .c file to an object file only if the .c file has been modified. But I have an error when I use all rule: When I use manually it works: My work directory: Makefile content: Answer this dependency line: concatenates $(OBJ_PATH) with the object name, but there…

Do here-strings undergo word-splitting?

Quoting Bash Reference Manual and man bash (version 4.3): [n]<<< word The word undergoes brace expansion, tilde expansion, parameter and variable expansion, command substitution, arithmetic expansion, and quote removal. Pathname expansion and word splitting are not performed. The word should not unde…

fork: child process doesn’t stay in an infinite loop

In the above code snippet inside if statement if we put while(1), it doesn’t remains blocked and when enter key is pressed program is exited, but in case of parent if we put while(1), parent remains blocked until we give ctrl+c. Please clarify this behaviour of child. Answer In the above code snippet in…

Bug while checking for symbols inside of a string?

I’m creating a small calculator script and I’ve got stumbled on a strange bug. Everything seems to work but not when I input anything starting with (. When I do that if gives false and the code inside of else executes. I’ve tried a lot of ways rewriting how should “$input” =~ [-,…

Linux piping data containing backticks

I’m piping output from one command into a second: mpc listall returns the following data (can output 1 or more lines): When piping it into the next command, it seems that my shell (Ash on BusyBox) converts the ´ into an asterisk, as I get the error Manually adding double quotes works! like this: So, I t…