Any command in my terminal that exits with non-zero code closes my terminal window
At first this was a bit funny, like playing “Bash Roulette”
…but now it’s getting old lol
At first this was a bit funny, like playing “Bash Roulette”
…but now it’s getting old lol
This is pretty basic, I have a folder with several subfolders of JS files and i want to run Google’s Clojure compiler on all of the files in those folders. The command to process a single file is as follows:
I am logged into ssh to a university account from my home computer. Then I find a file that I want to copy onto my local system. So I open a new shell terminal and am about to use scp to copy that file onto my system. But the path to the file on the system I am ssh‘ed into is long so I select it with the mouse and then paste it with the mouse into the other locally connected terminal.
% echo -e '1n2' | parallel "bash -c 'echo :$1' '' {}" :1 :2 % echo -e '1n2' | parallel bash -c 'echo :$1' '' {} % I’d expect the second line to act the same. Answers: Thank you for visiting the Q&A section on Magenaut. Please note that all the answers may not help … Read more
I would like to be able to copy and paste text in the command line in Bash using the same keyboard bindings that Emacs uses by default (i.e. using C-space for set-mark, M-w to copy text, C-y, M-y to paste it, etc.).
I am confused by “one only dot – space – shell script name” (like . myshellscript) and “path to shell script” (like ./myshellscript) commands. What for they are? I noticed the command . myshellscript executes shell script even with -rw-rw-r–. But ./myshellscript doesn’t. So I am confused. Answers: Thank you for visiting the Q&A section … Read more
I intend to pipe the output of a program into a while read VAR loop and break when a pattern is found, but it doesn’t.
I’m used to bash‘s builtin read function in while loops, e.g.:
Given an array of strings, I would like to sort the array according to the length of each element.
Let’s say there’s a directory that I don’t have the privileges to access. Obviously sudo cd foo won’t work, because cd is a shell builtin in every shell ever.