Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

file search in ksh 1

Status
Not open for further replies.

edfair

Technical User
Apr 17, 2000
8,703
US
I have a software upgrade installed with ksh supposedly for unix 3.2v4.2. In a decision tree to locate previous versions is the statement "if [ -e filename". The install reports an error on this line since ( -e ) is not a valid choice in 4.2. I suspect that the software company sent the wrong upgrade but they won't admit any problem on their end.

I don't have any open server up or available at this time so I can't check to see if this is a valid test on later versions of the OS.

Is "if [ -e filename" a valid test in any open server version? Can be found with man ksh.
Thanks
ed Ed Fair
efair@atlnet.com

Any advice I give is my best judgement based on my interpretation of the facts you supply.

Help increase my knowledge by providing some feedback, good or bad, on any advice I have given.

 
Ed,

the [ is a synonym (sp?) for test.
(man test)
in 5.0.4 and above -e is a valid parameter.
it is not valid in 3.2.4.2.

Hope this helps,

stan
 
Thank you. I've caught the software support staff in a lie. Not the first but every one has been like pulling teeth. Ed Fair
efair@atlnet.com

Any advice I give is my best judgement based on my interpretation of the facts you supply.

Help increase my knowledge by providing some feedback, good or bad, on any advice I have given.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top