grep doesn’t output until EOF if piped through cat
Given this minimal example
Given this minimal example
I just tried to run this command:
I’m not exactly sure if this is a “right” question to post here. I’m probably asking more about “opinions” than actual categorical answers (of those that either work or don’t, and that’s it). I was wondering what name separators would be the most linux friendly (or more specifically, Bash friendly) and human friendly at the … Read more
I’m trying to write a function to replace the functionality of the exit builtin to prevent myself from exiting the terminal.
I often use ctrl+c to copy text from some gui application and then paste it into my terminal emulator (terminator), using right-mouse-click-menu and paste. Sometimes I forget that the clipboard contains several lines, which when pasted into bash causes each line to be “executed”
./spritz: line 176: syntax error: unexpected end of file
Lets’s say my prompt looks like this (the _ represents my cursor)
In shell scripts one specifies language interpreter on shebang(#!) line. As far as I know, it is recommended to use #!/usr/bin/env bash because env is always located in /usr/bin directory while location of bash may vary from system to system. However, are there any technical differences if bash is started directly with /bin/bash or through … Read more
As a simple example, I have a bunch of source code files. I want to store the “head” command output to a variable for all these files.
I’m trying to find a way to immediately move a file to another folder as soon as it appears in my dropbox on CentOS.