Sponsored Content
Full Discussion: Version checking
Top Forums Shell Programming and Scripting Version checking Post 303022718 by indeed_1 on Wednesday 5th of September 2018 04:29:21 PM
Old 09-05-2018
I try below code, but give me this error : ./script.sh: line 14: -bind /home/config: No such file or directory.
I think it is related to output of this command "ps -eo args",
"-bind /home/config"
consider "-bind" as argument, if I able to define only address of config file problem will be fix but i have no idea how can I extract only address of config file and suppress "-bind" !



Code:
#!/bin/sh
cnt=0
ps -eo args |
while read prog args
do
type=""
  case $prog in
  (*app);;
  (*)
    continue;;
  esac
 ver=$("$prog" -version </dev/null)

readconfig < $args
readconfig(){
  # set state, hostname, ip
  while IFS=" =" read confkey confval
  do
    case $confkey in
    ([Ss]tate) state=$confval;;
    ([Hh]ostname) host=$confval;;
    ([Ii]p) ip=$confval;;
    esac
  done
}

echo $confkey $confval $state $hostname $ip


Last edited by indeed_1; 09-05-2018 at 06:13 PM..
 

9 More Discussions You Might Find Interesting

1. UNIX Desktop Questions & Answers

checking of GNU C Complier version

Hi, How do i check the GNU C Complier my system is running? thanks jennifer (2 Replies)
Discussion started by: jennifer
2 Replies

2. UNIX for Dummies Questions & Answers

checking for non-zero value

I have a process that spits out a file called sqlplus.out, here is what the result looks like: Currently the value you see is zero, what I need to do is perform an action if that value is non-zero, so how do I check that value in an if statement? If it helps at this moment in development the... (6 Replies)
Discussion started by: philplasma
6 Replies

3. AIX

checking the version revisions of a java file inside the ear using KSHELL in AIX.

consider on day1, in PVCS repository we have java files like a.java,b.java with version revision 1.0, through ANT build script we have compiled and created an ear,named c.ear in AIX build server.we have transfered this ear from build server to portal server through FTP using KSHELL. consider... (0 Replies)
Discussion started by: kareemaashik
0 Replies

4. Solaris

Migrate unix version 8 to version 9

i have a program writing in PRO C which currently running in unix version 8 tie with oracle 8i, but in the future company gonna migrate this OS to version 9. Anything i have to prepare for my PRO C program to run in unix version 9? or anything would that impact my program couldn't run well? what... (2 Replies)
Discussion started by: lsy
2 Replies

5. UNIX for Advanced & Expert Users

Advanced Search * View * Edit JAVA version to WORK in GLASSFISH Forum topic JAVA version

Would like to confirm the ff. I got confused actually with the version I needed to download that will work on glassfish 3.0.1 a. Debian Squeeze (HP DL360). Need to use java version6 On Debian, I did apt-get install sun-java6-jdk. So when I check it's java version "1.6.0_22" Java(TM) SE... (1 Reply)
Discussion started by: lhareigh890
1 Replies

6. SCO

Stop boot system at "Checking protected password and checking subsystem databases"

Hi, (i'm sorry for my english) I'm a problem on boot sco unix 5.0.5 open server. this stop at "Checking protected password and checking subsystem databases" (See this image ) I'm try this: 1) http://www.digipedia.pl/usenet/thread/50/37093/#post37094 2) SCO: SCO Unix - Server hangs... (9 Replies)
Discussion started by: buji
9 Replies

7. Shell Programming and Scripting

Copy a file from directroy/ prior version to the directory/ new version

How to copy a file from directroy/ prior version to the directory/ new version automatically. (4 Replies)
Discussion started by: roy1912
4 Replies

8. AIX

Checking xlc compiler version

Hi, Below is output of lslpp command. bash-3.00# lslpp -L | grep xlC xlC.aix50.rte 11.1.0.1 C F XL C/C++ Runtime for AIX 5.3 xlC.cpp 9.0.0.0 C F C for AIX Preprocessor xlC.msg.en_US.cpp 9.0.0.0 C F C for AIX... (2 Replies)
Discussion started by: manoj.solaris
2 Replies

9. Red Hat

OS version and Firmware version

Guys, How to find OS version and firmware version in LINUX? Like in AIX. uname -a will show me the version 5.3, 6.1,7.1. lsmcode -c will show me - system firmware image as SF240_417. What are the similar commands in Linux. I checked uname -a and cat /etc/release. uname... (1 Reply)
Discussion started by: ElizabethPJ
1 Replies
MEDIATOMB(1)							   User commands						      MEDIATOMB(1)

NAME
mediatomb - UPnP MediaServer SYNOPSIS
mediatomb [-i IP address ] [-e interface ] [-p port ] [-c config file ] [-d] [-m home dir ] [-f config dir ] [-P PID file ] [-u user ] [-g group ] [-a path ] [-l logfile ] [-D] [--compile-info] [--version] [-h] DESCRIPTION
This manual page describes the command line parameters for MediaTomb. For a detailed documentation please see the README file which is distributed with MediaTomb or visit http://mediatomb.cc/. OPTIONS
-i, --ip The server will bind to the given IP address, currently we can not bind to multiple interfaces so binding to 0.0.0.0 will not be possible. -e, --interface The server will bind to the given network interface, currently we can only bind to one interface at a time. -p, --port Specify the server port that will be used for the web user interface, for serving media and for UPnP requests, minimum allowed value is 49152. If this option is omitted a default port will be chosen, however, in this case it is possible that the port will change upon server restart. -c, --config By default MediaTomb will search for a file named "config.xml" in the ~/.mediatomb directory. This option allows you to specify a config file by the name and location of your choice. The file name must be absolute. -d, --daemon Run the server in background, MediaTomb will shutdown on SIGTERM, SIGINT and restart on SIGHUP. -m, --home Specify an alternative home directory. By default MediaTomb will try to retrieve the users home directory from the environment, then it will look for a .mediatomb directory in users home. If .mediatomb was found we will try to find the default configuration file (config.xml), if not found we will create both, the .mediatomb directory and the default config file. This option is useful in two cases: when the home directory can not be retrieved from the environment (in this case you could also use -c to point MediaTomb to your configuration file or when you want to create a new configuration in a non standard location (for example, when setting up daemon mode). In the latter case you can combine this parameter with the parameter described in Section 5.6, "Config Directory" -f, --cfgdir The default configuration directory is combined out of the users home and the default that equals to .mediatomb, this option allows you to override the default directory naming. This is useful when you want to setup the server in a nonstandard location, but want that the default configuration to be written by the server. -P, --pidfile Specify a file that will hold the server process ID, the filename must be absolute. -u, --user Run MediaTomb under the specified user name, this is especially useful in combination with the daemon mode. -g, --group Run MediaTomb under the specified group, this is especially useful in combination with the daemon mode. -a, --add Add the specified directory or file name to the database without UI interaction. The path must be absolute, if path is a directory then it will be added recursively. If path is a file, then only the given file will be imported. -l, --logfile Do not output log messages to stdout, but redirect everything to a specified file. -D, --debug Enable debug log output. --compile-info Print the configuration summary (used libraried and enabled features) and exit. --version Print version information and exit. -h, --help Print a summary about the available command line options. AUTHORS
Sergey Bostandzhyan Leonhard Wimmer COPYRIGHT
Copyright (C) 2005 Gena Batsyan, Sergey Bostandzhyan Copyright (C) 2006-2008 Gena Batsyan, Sergey Bostandzhyan, Leonhard Wimmer This manual page is part of MediaTomb. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU General Public License version 2 as published by the Free Software Foundation. MediaTomb 0.11.0 2008-02-23 MEDIATOMB(1)
All times are GMT -4. The time now is 06:21 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy