Dear.
I needed to read 16 bytes from a binary file and tried to replace a hexdump
call with read built-in. I expected that with "-N1" if a NUL character is
encountered bash would assign an empty string, however there's no indication
that a NUL character was there and it simply assigns the next
Hi list.
Want to read whole stdin into variable.
Don't want to spawn new processes (cat).
Don't want to reopen existing fd 0
First thing I tried: $(0)
It silently returns an empty string.
From bash manual:
The command substitution $(cat file) can be replaced by the equivalent but
faster $(
On Wed, Apr 24, 2013 at 7:31 AM, Ilya Basin [1]basini...@gmail.com
wrote:
Hi.
$ cat ~/.bashrc
#
# ~/.bashrc
#
echo Im in .bashrc 2
RHEL 6.0, bash 4.1.2
$ ssh localhost 'ps -f $$ true'
Im in .bashrc
UID
Hi.
$ cat ~/.bashrc
#
# ~/.bashrc
#
echo Im in .bashrc 2
RHEL 6.0, bash 4.1.2
$ ssh localhost 'ps -f $$ true'
Im in .bashrc
UIDPID PPID C STIME TTY STAT TIME CMD
git 22295 22294 0 08:29 ?Ss 0:00 bash -c ps -f $$ true
Hi.
I have a script that creates some background tasks.
I want the whole tree to be killed by Ctrl-C.
There's a requirement that the script process and its children must
belong to the same process group. This is why I can't enable job
control.
I don't want to use 'trap', because it adds
Configuration Information [Automatically generated, do not change]:
Machine: i686
OS: linux-gnu
Compiler: gcc
Compilation CFLAGS: -DPROGRAM='bash' -DCONF_HOSTTYPE='i686'
-DCONF_OSTYPE='linux-gnu' -DCONF_MACHTYPE='i686-pc-linux-gnu'
-DCONF_VENDOR='pc' -DLOCALEDIR='/usr/share/locale'