Posts tagged bash
MWE With the following tree: l1 └── l2 ├── d0 │ ├── f0 │ ├── f1 │ ├── f2 │ ├── f3 │ ├── f4 │ └── f5 ├── d1 │ ├── f0 │ ├── f1 ...
Where can I find documentation on double asterisk in glob expansion? It is discussed in the .gitignore section of Pro Git. It works in ls **/* to list all terminal files. It is supported by py...
Question How do you specify underscores as Vim word boundaries when using vim mode in either bash or zsh? MWE w on this_word should place the cursor on the underscore. A second w should place th...
How do you find out the number of files in a directory from the command line?
That's my Bash script: #!bin/sh cd qpixel sudo systemctl enable mysql mysql -u root -p rails s When it executes the line mysql -u root -p it will ask for password. To do so, I have tried...
If I want to yank my last command I can UP yy, but this does not copy to the system clipboard. How do I configure my terminal to copy to the system clipboard so I can paste into other programs? ...
Using BASH, how can I redirect stdout and stderr each, to two separate files, simultaneously? That's a mouthful, let me clarify a little: I have a hypothetical script that may/will generate outpu...
I have a shell script with a syntax compatible to both bash and zsh, except for a section that has zsh specific syntax that throws syntax errors if sourced from bash. Is there an easy way to escap...
I have a handful of shell scripts that accept any number of command line arguments, then do some relatively expensive processing based on each command line argument in turn. The general format for ...
I copy-paste several commands at once from a markdown editor (Typora) to Bash in a Putty window terminal; the file I work with reads as follows (empty lines included): $ non sed command 1 $ non s...