All Questions

Tagged with
Filter by
Sorted by
Tagged with
0
votes
0answers
36 views

How to work with file descriptors stored in variables?

For example, if I assign TWO=2 ...the following fails (with date: invalid date '2'): date >> logfile $TWO>&1 Of course, I can always do eval "date >> logfile $TWO>&1" ...
2
votes
1answer
125 views

Does fd number of various shells fixed?

Let's say: xb@dnxb:/tmp$ echo 'ls -l /proc/$$/fd | grep a.sh' > a.sh; \ > while IFS='' read -r f; do \ > echo "$f"; "$f" a.sh; \ > done < <(tail -n +2 /etc/shells) /bin/sh lr-x------...
3
votes
1answer
189 views

Why does zsh open a file descriptor off by one?

I can open a file descriptor explicitly the normal way: $ ls -lh /dev/fd/ total 0 lrwx------ 1 tavianator users 64 Jul 10 11:06 0 -> /dev/pts/6 lrwx------ 1 tavianator users 64 Jul 10 11:06 1 ->...
2
votes
1answer
232 views

Moving file descriptors in zsh

The construction ls 3>&2 2>&1 1>&3- in zsh does not behave in a manner consistent with ksh/bash or with more limited shells like dash that don't support moving file descriptor at ...
3
votes
2answers
117 views

Mark descriptor as terminal for the -t test

One can test if a descriptor is connected to terminal with -t test. if [ ! -t 0 ]; then echo "Stdin is not from terminal" fi Having a descriptor X, pointing to a file or to a process (with >(cmd)...
11
votes
1answer
2k views

Why doesn't the process substitution <() work with ssh -F

I have some vagrant virtual machines. To log into them I issue the vagrant ssh command. I want to log into them using regular ssh command. The vagrant ssh-config outputs the suitable config file $ ...