Language:
switch to room list switch to menu My folders
Go to page: 1 2 [3] 4 5 6 7 ... Last
[#] Wed Jan 21 2004 16:06:45 EST from fleeb @ Uncensored

[Reply] [ReplyQuoted] [Headers] [Print]


Yeah, I think info was indeed created before html was popular.

However, info doesn't strike me as being terribly popular.

[#] Wed Jan 21 2004 16:13:00 EST from Peter Pulse @ Uncensored

[Reply] [ReplyQuoted] [Headers] [Print]

It's about time they gave up. It's not popular because there's too much baggage and not enough backward compatibility. And it just doesn't make sense anymore.

[#] Wed Jan 21 2004 16:42:08 EST from Chickenhead @ Uncensored

[Reply] [ReplyQuoted] [Headers] [Print]

Well, if it's markup you wanted...man pages WERE originally "marked up" in nroff format. Dunno if they still are.

[#] Wed Jan 21 2004 22:07:51 EST from IGnatius T Foobar @ Uncensored

[Reply] [ReplyQuoted] [Headers] [Print]

Parts of GNU have been fabulously successful, and parts of GNU are stupid flops. RMS ought to savor the successes and cut the losses, and realize that even though his vision of a free operating system did not happen exactly the way he wanted, something wonderful *did* happen and Free Software is a big success.

GNU winners include gcc and all the utilities surrounding it. GNU losers include "info" and the HURD kernel.

[#] Sun Feb 08 2004 00:39:28 EST from Hue Jr. @ Anansi-Del

[Reply] [ReplyQuoted] [Headers] [Print]


Bleah. Here's a simple script:

#!/bin/ksh

cat /etc/passwd | while read a
do
XX=muck
echo $XX
done
echo end: $XX

Output on Solaris:

muck
muck
muck
muck
muck
muck
muck
muck
muck
muck
muck
muck
end: muck

output on Linux RH7 and RH9:

muck
muck
muck
muck
muck
muck
muck
muck
muck
muck
muck
muck
muck
muck
muck
end:

Someone explain to me the error of my ways, please.

[#] Sun Feb 08 2004 02:23:57 EST from LoanShark @ Uncensored

[Reply] [ReplyQuoted] [Headers] [Print]


Hue: What's your point? I don't see what you're trying to accomplish.

[#] Sun Feb 08 2004 08:25:54 EST from Ragnar Danneskjold @ Uncensored

[Reply] [ReplyQuoted] [Headers] [Print]

Looks like that may be a Korn Shell issue. Your variable doesn't seem to be making it outside of your loop. I just tried the same with bash on OSX and got the same results as your Linux output.

[#] Sun Feb 08 2004 10:23:44 EST from Ford II @ Uncensored

[Reply] [ReplyQuoted] [Headers] [Print]

actually It's gotta be a shell issue.
the default shell on rh is bash, and the default shell on sun isn't.
shells are similar but certainly there's no 'standard'
I've ru ninto things like that before as well.

[#] Sun Feb 08 2004 10:24:56 EST from Ford II @ Uncensored

[Reply] [ReplyQuoted] [Headers] [Print]

and to be clear, it's not wrong, it's just how each shell is implemented. If you need it to work one way across systems oh. you did do #!/bin/ksh. hmmmm...
gee. Dunno. make sure ksh it really ksh on both machines?

[#] Sun Feb 08 2004 10:46:00 EST from IGnatius T Foobar @ Uncensored

[Reply] [ReplyQuoted] [Headers] [Print]

It appears that when you do the "|" thing to set up a pipeline, one system's ksh keeps all of the subshell's variables in scope, and one doesn't.

[#] Sun Feb 08 2004 10:50:38 EST from LoanShark @ Uncensored

[Reply] [ReplyQuoted] [Headers] [Print]


Oh, I see. Yeah, I've run into that when moving scripts from solaris to linux (or vice versa)..

[#] Sun Feb 08 2004 11:29:18 EST from Chickenhead @ Uncensored

[Reply] [ReplyQuoted] [Headers] [Print]

There is a port of the original AT&T KSH (which Solaris undoubtadly uses) for Linux...it's rather hairy to get going though because AT&T is using some sort of bizarre packaging & compilation system (nothing as simple as a ./configure).

[#] Sun Feb 08 2004 11:31:46 EST from IGnatius T Foobar @ Uncensored

[Reply] [ReplyQuoted] [Headers] [Print]

sssssssssh... don't tell Darl

[#] Sun Feb 08 2004 12:33:22 EST from Hue Jr. @ Anansi-Del

[Reply] [ReplyQuoted] [Headers] [Print]


The really strange part is that I developed the script this is abstracted from on Linux and I clearly remember it WORKING before I pushed it over to the Solaris box. The next night it had quit working.

The man page for ksh clearly states the loop is not in its own subshell, but also says you can use ( and ) run stuff in subshells. I'm almost wondering if we have an uninitialized variable that occasionally puts loops into subshells.

[#] Mon Feb 09 2004 09:15:47 EST from Tony Preston @ Uncensored

[Reply] [ReplyQuoted] [Headers] [Print]

Isn' the line "XX=muck" the definding of a local variable, only defined for the process.

That would mean that the "POSIX" behavior is to create it in the process, when the process dies
it is gone. It is sort of like doing a cd command within a subprocess, then not being in the
directory after you exit the process.

[#] Mon Feb 09 2004 13:21:02 EST from Hue Jr. @ Anansi-Del

[Reply] [ReplyQuoted] [Headers] [Print]


Tony, yeah, but a subprocess is not supposed to be spawned for the while loop in ksh.

[#] Mon Feb 09 2004 14:20:41 EST from IO ERROR @ Uncensored

[Reply] [ReplyQuoted] [Headers] [Print]

Hue, the bash man page states that "Each command in a pipeline is executed as a separate process (i.e. in a subshell)." To get this to work you'll need to find another way to do it... I was able to get it to exhibit the behavior you want with the following:

#!/bin/bash

while read a
do
XX=muck
echo $XX
done < /etc/passwd
echo end: $XX

[#] Mon Feb 09 2004 15:21:05 EST from IO ERROR @ Uncensored

[Reply] [ReplyQuoted] [Headers] [Print]

And just for shirts and groans I installed the AT&T ksh (with gentoo it's simple, "emerge ksh" will do everything for you) and then tried the script as modified... first, let me say their build process IS quite bizarre.


Anyway, I tried the script, and lo and behold, it works as well in AT&T ksh.

[#] Mon Feb 09 2004 19:14:01 EST from Chickenhead @ Uncensored

[Reply] [ReplyQuoted] [Headers] [Print]

I don't understand AT&T's packaging/build process. It's cryptic beyond belief.
I don't understand why they don't release their stuff in the usual tar.gz format...

..all I know is that when I got their Korn shell built, I made sure I didn't have to do it again.

[#] Mon Feb 09 2004 23:54:27 EST from Hue Jr. @ Anansi-Del

[Reply] [ReplyQuoted] [Headers] [Print]


IO Error, thank you but since I'm specifically designated ksh, it should act like ksh (and as the ksh man page specifies on Linux). This also doesn't address the fact that I clearly remember it working properly and then it started failing later ... very annoying.

Go to page: 1 2 [3] 4 5 6 7 ... Last