General discussion

Locked

need script help

By mvforward ·
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

This conversation is currently closed to new comments.

4 total posts (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Comments

Collapse -

need script help

by cpfeiffe In reply to need script help

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

Collapse -

need script help

by ghislain.levesque In reply to need script help

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

Collapse -

need script help

by mvforward In reply to need script help

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

Collapse -

need script help

by mvforward In reply to need script help

Thanks for the input -- just what i needed
:-)

Back to Linux Forum
4 total posts (Page 1 of 1)  

Related Discussions

Related Forums