Skip to content
Advertisement

Tag: zsh

Possible to combine glob sort w/ alternation in zsh?

Looking for a shell-only[1] way to take this list of dirs: And return it sorted numerically, with the subdirs showing up right after their parent: (*|*/bar)(n) is rejected as a bad pattern, while */{,bar}(n) expands to */(n) ~/bar(n) so the subdirs show up at the end. [1] I need this to be able to work on a wide variety of

Obtaining file names from directory in Bash

I am trying to create a zsh script to test my project. The teacher supplied us with some input files and expected output files. I need to diff the output files from myExecutable with the expected output files. Question: Does $iF contain a string in the following code or some kind of bash reference to the file? Note: Any tips

bash command not found when setting a variable

I am writing a shell script where I am setting few variables, whose value is the output of commands. The errors I get are: now, I did read other similar questions and based on it, I tried various things: spliting command into two calls tried using backticks tried using $() But in every case the command output is getting executed.

SSH – Entering a Passphrase Only Once

On $ ssh localhost, I was being asked to provide password. It was tedious and kind of annoying to provide password for every login. So, I have created ssh keys with passphrase.. I have copied the content of the ~/.ssh/id_rsa.pub to ~/.ssh/authorized_keys Now, on $ ssh localhost I was being asked to provide passphrase. No improvement, but instead of providing

Backspace in zsh fails to work in quite the strange way

I’m on a fresh Virtualbox install of CentOS 6.4. After installing zsh 5.0.2 from source using ./configure –prefix=/usr && make && make install and setting it as the shell with chsh -s /usr/bin/zsh, everything is good. Then some time after, after installing python it seems, it starts acting strange. Happens with PuTTY and iTerm2 over SSH, does not happen on

Advertisement