if :Expression Syntax problem at login

if :Expression Syntax problem at login

Post by Azunna Anyanw » Tue, 07 Jan 1997 04:00:00



I've got a problem that I hope can be resolved without a reinstall of
Linux.  When I log in as anybody (root or myself) or if I start up an
xterm, I get "if : Expression syntax" (without the quotes). Seems, like
one of my files has the wrong use of if in there.  But which one.  I've
determined that it's probably not in my .cshrc or .login because the
last line that shows up before this (when I log in at the console) is
"You have mail" which is the last command in my .cshrc.  
        Any help will be greatly appreciated, because I've been limping along
with this problem for a couple of weeks while trying to solve it.  FWIW,
I'm on Slackware 3.1 kernel 2.0.25.  Anything else you need to know just
ask.  Thanks.  

--
Azunna Anyanwu '00
Computer Science Concentrator / Pre-med

"To err is human but to really foul things up requires a computer."

 
 
 

if :Expression Syntax problem at login

Post by Jurgen Exne » Wed, 08 Jan 1997 04:00:00




Quote:> I've got a problem that I hope can be resolved without a reinstall of
> Linux.  When I log in as anybody (root or myself) or if I start up an
> xterm, I get "if : Expression syntax" (without the quotes). Seems, like
> one of my files has the wrong use of if in there.  But which one.  I've
> determined that it's probably not in my .cshrc or .login because the
> last line that shows up before this (when I log in at the console) is
> "You have mail" which is the last command in my .cshrc.  

[...]

Probably this is nevertheless a bug in .cshrc. It might be possible, that
some of the code in .cshrc will only be executed, when the shell is started
from a x environment.  It's quite common to e.g. set the prompt to
different values depending if it's a "shell-shell" or a "X-windows shell".

If the error message only appears when starting a new xterm, then I would
check .cshrc first.

If it appears when starting X, then I would check .xinitrc

jue

--
The opinions expressed in this message are my own personal views
and do not reflect the official views of Microsoft Corporation

 
 
 

if :Expression Syntax problem at login

Post by Azunna Anyan » Thu, 09 Jan 1997 04:00:00


Problem resolved.  Thanks for everyone's help especially Michael J. Banks
who suggested that I put in echo statements in my startup files.  It
turned out to be the script that was supposed to be put for isapnptools in
my .login.  if [ blah blah ];  didn't work and I changed it to if ( )

--
Azunna Anyanwu '00              Union Dorms User Assistant

Computer Science Concentrator / Pre-med

: I've got a problem that I hope can be resolved without a reinstall of
: Linux.  When I log in as anybody (root or myself) or if I start up an
: xterm, I get "if : Expression syntax" (without the quotes). Seems, like
: one of my files has the wrong use of if in there.  But which one.  I've
: determined that it's probably not in my .cshrc or .login because the
: last line that shows up before this (when I log in at the console) is
: "You have mail" which is the last command in my .cshrc.  
:       Any help will be greatly appreciated, because I've been limping along
: with this problem for a couple of weeks while trying to solve it.  FWIW,
: I'm on Slackware 3.1 kernel 2.0.25.  Anything else you need to know just
: ask.  Thanks.  

: --
: Azunna Anyanwu '00
: Computer Science Concentrator / Pre-med

: "To err is human but to really foul things up requires a computer."

 
 
 

1. Correct Syntax for configuring IFS shell variable ?

Hi,

I'm writing a ksh script and having a problem in setting up field
seperators whenever reading from strings / files. (I'm using SunOS5.5.1)

I'm performing a grep -w on an input file, and assuming a -w : word is
defined as anything being delimited by the IFS shell variable, I need it
to be able to handle a comma seperator as well as the original space,
new line and tab.

Does anyone know the correct syntax for setting up the IFS Shell
variable ?
And do I need to have root priviledges to set it up ?

Also, I'd be interested to know how to do the equivalent in csh.

Thanks in advance.

Balraj Jassal

2. How to communicate with COM port?

3. Regular Expression Syntax Limitation?

4. extend ethernet header to 18 bytes?

5. Help with samples of regular expressions syntax please

6. Accessing 192.168.x.x addresses from the outside world

7. tcsh Controlling Expressions Syntax

8. Help Requested: DU 4.0 Netscape Navigator Problems

9. @: Expression syntax

10. Need to know correct syntax for conditional expression

11. if expression syntax error

12. Compare Login against Regular Expressions using regexec, regcomp

13. Q: ksh --login syntax or equivantent. HELP!