PLEX86  x86- Virtual Machine (VM) Program
 Plex86  |  CVS  |  Mailing List  |  Download  |  Linux  |  Newsgroups

want shell should I learn 13


Your Ad Here

Your Ad Here

want shell should I learn 14
That's the way I remember it and I see no evidence to the contrary. Do you want me to google? Uh ... I see...

Yes, but I was responding to the phrase

"The familiarity-relearning issue is basically symmetrical."

You can't transfer learning from tcsh to bash. - I agree You can't transfer learning from bash to tcsh. - I agree You can't transfer learning from tcsh to tcsh. - This is the point I was making.

I used csh-tcsh for a decade, and I could never predict what would happen if I tried to combine when I knew into new ways. I could take an expression for a while () command, and use the same one for an if () command, and it would break.

Yes - I also learned that work around. But the manual page does not say a space is *REQUIRED*. It's an undocumented work-around for the buggy parser.

want shell should I learn 18
On 2006-01-07, Peter T. Breuer Of course it's not. For serious programming, whether scripts or any other language, I use a text editor. My editor is...

Well, it really is

if (! $?variable )

But I tried to port that working code from one system to another, and got a syntax error. Yes, I had to add an (undocumented but required) space.

However, the second command has two problems.

1) it only works if the array alreay exists.

set a = () Generates an error

But set a = (2) is not an error.

Second

works, but

does not. One might expect that if setting a1 to "1" works, then "a" should work as well. But it's not the case. I just learned this a week ago when I tried to fix someone code posted here. I was surprised. Yes, tcsh has array variables, but it's really a half-butted sort of array.

I suppose one can use

set a = ( "a" $a2- )

to do the same thing, but suppose I wanted to initialize an array in a for () loop. I would think this would work

end

But it doesn't.

But this is the type of thing that can bite you with csh. You can use it for years, and then when you try to add something to it, it fails in a strange unpredictable way. That's the point.

You use it the C shell for years, try to add something, and you end up bashing your head against a wall for hours trying to work around something you would expect to work.

want shell should I learn 16
On 2006-01-06, Peter T. Breuer No, the command line is itself an editor. It is more limited than a full editor, but it is a trade-off for speed...

I mentioned problems with build-ins and variables, especially when combined. For instance echo "!1" should work. But it doesnt always.

Here's my list of csh variables. I'm using the term "variable" to mean a special character followed by an identifier, which can have different values.

* Regular variables - $a * Wordlist variables - $a1 * Environment variables - $A * Alias arguments - !1 * History arguments - !1 * Sub-process variables - %1 * Directory variables - ~user

want shell should I learn 15
Because you told me that was what you could use in bash! You do if you use bash...

It would be handy to combine these in any way you want to. But you can't. Some build-in commands only work with some variables.

Yikes!

Any script that reads ~-.cshrc could break in strange ways. The script might work for one person, but not another. It might be fine for your own scripts, but with multiple users, it's begging for disaster.

That's why I always started my scripts with #!-bin-csh -f so it runs the same for everyone.

want shell should I learn 17
That's what I said was not adequate for writing a program in, since it lack colorization, formatting, bracket matching, etc. Apparently one can do...

You are not reading the files from a pipe. You are reading them from an array. Sometimes this array isn't large enough. I've overflowed `program` many times.

Try piping find directly into your foreach loop. You can't. You have to use a second script. And if you did, and tried

would not work. I don't thinkproc-self-fdwould work either. BTW it's trivial in the Bourne shell:

-- Sending unsolicited commercial e-mail to this account incurs a fee of $500 per message, and acknowledges the legality of this contract.



Your Ad Here

List | Previous | Next

want shell should I learn 14

Linux groups from Newsgroups

The #1 Usenet Provider on the Internet

want shell should I learn 12