Eric Blake wrote:
According to Damo, David on 1/14/2010 3:39 PM:
Hi,
I had a script that worked on UNIX, but on Cygwin it does not work. When I set
a variable in a while loop I can't use it after the loop. However, this worked
in UNIX. Any ideas why?
Yes. ksh vs. bash.
On Friday, January 15, 2010, Thomas Wolff wrote:
As was responded before, this isn't supposed to work in a pipe. Not in ksh
either, I think,
No, it works in real ksh. If the last command in a pipeline is a
builtin, it is run in the current shell.
$ unset foo bar
$ echo ${foo=hiya} | read
The pipe is what spawns the sub shell. In Unix the last process runs in your
current shell. In Linux the first process of the pipe runs in the current
shell. The difference is that when the while statement (which is run in the
sub shell) finishes the sub shell dies and any variable changes
Brian Wilson wilson at ds.net writes:
The pipe is what spawns the sub shell. In Unix the last process runs in your
current shell. In Linux the first process of the pipe runs in the current
shell. The difference is that when the while statement (which is run in the
sub shell) finishes
Hi,
I have fixed the problem. It seems in cygwin it spawns a subshell even under
bash. I used a for loop instead and everything worked nicely.
for line in `sed 's/\$/^/g' $propfile`
do
nvpair=$(echo $line | awk -F= '{print $1,$2}')
set -- $nvpair
if [ ! $1 = ]; then
On 1/14/2010 5:23 PM, Damo, David wrote:
Hi,
I have fixed the problem. It seems in cygwin it spawns a subshell even under
bash. I used a for loop instead and everything worked nicely.
for line in `sed 's/\$/^/g' $propfile`
do
nvpair=$(echo $line | awk -F= '{print $1,$2}')
Am 15.01.2010, 00:40 Uhr, schrieb Jeremy Bopp jer...@bopp.net:
On 1/14/2010 5:23 PM, Damo, David wrote:
Hi,
I have fixed the problem. It seems in cygwin it spawns a subshell even
under bash. I used a for loop instead and everything worked nicely.
for line in `sed 's/\$/^/g' $propfile`
do
According to Damo, David on 1/14/2010 3:39 PM:
Hi,
I had a script that worked on UNIX, but on Cygwin it does not work. When I
set a variable in a while loop I can't use it after the loop. However, this
worked in UNIX. Any ideas why?
Yes. ksh vs. bash.
8 matches
Mail list logo