Search Results

Search: Posts Made By: vomv1988
2,935
Posted By Don Cragun
Because command substitution (`command` or...
Because command substitution (`command` or $(command)) removes trailing newlines from the output of the commands performed.
3,989
Posted By Yoda
I don't know what magic it is but I'm getting it...
I don't know what magic it is but I'm getting it right!!
y: print next byte
n: don't print next byte
q: quit
y
The input byte is:
48 H
y: print next byte
n: don't print next byte
q: quit
y...
2,044
Posted By bakunin
There are a number of wrong presumptions in your...
There are a number of wrong presumptions in your post about how some Unix-facilities work. I will try to address them one by one. Bear with me, sometimes the relation of explanation and problem will...
15,934
Posted By Scrutinizer
I mean that one should avoid: { sleep 2; ps -f...
I mean that one should avoid:
{ sleep 2; ps -f > "$FIFO"; echo "hello from $FIFO" > "$FIFO" ;} &
using exec is just one way of avoiding that...
{ exec >"$FIFO"; sleep 2; ps -f ;echo "hello from...
15,934
Posted By ygemici
Yes or #!/bin/bash PIPE="/tmp/pipe.$$" ...
Yes or
#!/bin/bash

PIPE="/tmp/pipe.$$"
mkfifo $PIPE

(
echo 'value' > $PIPE &
)

VARIABLE=`cat $PIPE`
echo $VARIABLE
rm $PIPE


#!/bin/bash

TMPF="/tmp/tmpf.$$"
mktemp $TMPF...
15,934
Posted By Scrutinizer
I would use mkfifo instead of mknod. You do not...
I would use mkfifo instead of mknod. You do not need the ( ) in this case.. If you have more than one write statement, it is better to use exec, otherwise VARIABLE=`cat $TMPFIFO` goes on after the...
15,934
Posted By Chubler_XL
What happens if you have more than 1 instance if...
What happens if you have more than 1 instance if this script running?

I would suggest generating a temp filename for the pipe and passing it to the child.
Showing results 1 to 7 of 7

 
All times are GMT -4. The time now is 07:16 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy