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

want shell should I learn 11


Your Ad Here

Your Ad Here

want shell should I learn 13
Yes, but I was responding to the phrase "The familiarity-relearning issue is basically symmetrical." You can't transfer learning from tcsh to...

Not true. A Bourne (or POSIX) script can be run in almost any shell except for tcsh-csh. You don't have to unlearn the basic syntax.

The problem with the C shell is that it is not symmetric with ITSELF.

Simple commands like if (!$?variable) if(1) while(1)

might or might not give you a syntax error. I tried the first one on a Sun, and got "Variable name must begin with a letter" error. The if(1) might work, but the while(1) might not.

Consider set a = (a) should do the same thing, but csh isn't symmetric with itself.

There are also 7 different kinds of variables in the C shell, and they are not symmetric. The built-ins aren't symmetric. And when you combine them the first time, one never knows what will happen. Examples:

repeat 3 myalias kill -1 `cat file` set j = ( `jobs` ) kill -1 $PID echo process $PID not running

That why I suggest people use another shell. I used Csh for years because it was all we had available as an interactive shell. But even the simple act of calling a awk or sed script caused problems.

Say I had an awk script (for example. #!-bin-awk -f {print $1 + 2; }

This was using the old awk that didn't let you contine lines with a, BTW.

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 that solaris 1. appears...

In sh: #!-bin-sh awk ' {print $1 + 2; } '

It looks the same. You can cut and paste. In csh #!-bin-csh -f awk '{print $1 + 2 ; }'

want shell should I learn 12
Do you mean "self-consistent"? One of the first lessons I was taught about csh is you should put a space before and after the parens. I'm not sure what you're...

You have to add quotes. And if I want to store the results, I'd use #!-bin-csh -f set a = `echo 7 awk '{print $1 +- 2 ;- }'`

Keeping track of those backquotes was a pain.

To me, sed and awk are essential to shell scripts. But csh is really unsuitable for languages that need multiple lines.

Well, noclobber isn't something I do in scripts. I test the file first.

And learning how to combine stdin and stderr is easy. Trying to make csh do anything else is difficult or impossible.

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

Try reading a list of filenames from a pipe, and doing something that asks for input from the user.

-- 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 12

Linux groups from Newsgroups

The #1 Usenet Provider on the Internet

want shell should I learn 10