Discussion Locked

need script help

0 helpful
4 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

Hi, just starting out in the scripting world. I need to know how to check for version of apps. here's what I'm trying to do. I need to check two files

/h/NETSCAPE/VERSION (i.e. 1.0.0.1)

/h/NETCOM/VERSION (ie 1.1.0.1)

if it's /h/NETCOM/VERSION then I need it to do add a plug in. if it's /h/NETSCAPE/VERSION I need to continue.

Thanks

4 replies

by cpfeiffe

Many ways, here's one --

If your script is in ksh (korn shell) or sh (bourne shell):
if [ -f /h/NETCOM/VERSION ]; then
commands to add plugin;
fi

If your script is in csh (C shell):
if ( -f /h/NETCOM/VERSION ) then
commands to add plugin
endif

The if statement will determine if the file requiring the plugin is there and if so you can add the plugin; otherwise the if statement is ignored and you continue processing your script. Be careful of syntax. Use semicolons and spacingappropriately, as described above.

Good luck,
Charles

by ghislain.levesque

On which Unix platform are you running on???

if Sun Solaris : pkginfo -l | grep Netscape

On HP-UX run sam

On DEC Unix run setup

by mvforward

the unix platform is Solaris 7. I'm not dealing with packages. if I understand correctly the pkginfo -i just gives you information on a package.

Thanks

This discussion is closed to new replies.