05-29-2015
Not quite clear.
Which command's exit code do you want to capture? $? is the last cmd's exit code and should always be 0 in above.
Where (and how) do you want to store whatever result you mean?
Why do you redirect stdout and stderr to /dev/null if you want some result?
Why do you use eval in above?
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
If i write this statement in a Korn Shell script
RCODE=$?
what possibly does it eman? (3 Replies)
Discussion started by: ranjita.c
3 Replies
2. Shell Programming and Scripting
Hi,
I want to check if a variable has a value assigned to it or not.
I can do following -
cat $Var > File1
if
then
echo "$Var has value"
else
echo "$Var is null"
fi
But I have to check for 3 Variables and I want to wrap it up in couple of unix statements.
Any... (3 Replies)
Discussion started by: sumeet
3 Replies
3. Shell Programming and Scripting
Hello,
I need help with the eval command.
I have been building a lengthy cmd using eval, and I need to create $var from the output of the cmd. Here is what I have.
Out=/dfezz1/output.txt
Node="'LPAR Info:'"
Gr3p0=" |grep"
Printc=" prtconf"
Output1=" 1>>$Out 0>&1"
Cat1="cat... (8 Replies)
Discussion started by: dfezz1
8 Replies
4. Shell Programming and Scripting
Hi
I have the following script :
#!/bin/ksh
compare()
{
cat $1>t1
cat $2>t2
cy1=`cut -f13 -d'Ç' t1`
cy2=`cut -f13 -d'Ç' t2`
print "cy1 = $cy1"
print "cy2 = $cy2"
if
then
echo "yes"
else
echo "no"
fi
} (6 Replies)
Discussion started by: bittoo
6 Replies
5. Shell Programming and Scripting
I am making of a script that will go through a couple of for loops and create file names based on the values in that loop, however the variable that combines everything is not getting assigned properly:
#! /bin/bash
for imod in K33_j1b_WS9_6
do
for emod in mb2A mb2C mb3A mb3C mb4A... (1 Reply)
Discussion started by: badinsults
1 Replies
6. Solaris
Hi,
i'm posting this in the Solaris forum although maybe it should be better in the General unix forum, I'm formatting an output witht he following command:
crontab -l | grep GBOUAT8 | grep UTP | grep -i stop | sed 's/\\//'
08 2 * * 2-6 /apps/sum_glob/gbo_uat/sparse/bin/dmg_cronlaunch -ENVI... (2 Replies)
Discussion started by: Cvg
2 Replies
7. Shell Programming and Scripting
The requirement is, there is a log file which contains a huge data. i need to get a particular field out of it by searching with another field.
ex:
2011-03-28 13:00:07,423 : millis=231 q={ call get_data_account(?,?,?,?,?) }, params=
i need to search for the word "get_data_account" in file... (1 Reply)
Discussion started by: Jassz
1 Replies
8. Shell Programming and Scripting
Hi all,
Hope someone can help me out here.
I have this BASH script (see below)
My problem lies with the variable path.
The output of the command find will give me several fields. The 9th field is the path. I want to captured that and the I want to filter this to a specific level.
The... (6 Replies)
Discussion started by: Cowardly
6 Replies
9. UNIX for Dummies Questions & Answers
I am trying to check whether a variable has been assigned on the command line or not.
Here is what I did:
#!/usr/bin/bash
if( $variable == '\0')
{
print "variable was not assigned"
exit
}
else
NF = 2 {print $1, ""}
exit
fi
awk -f question1.awk variable = 58 letters.txt.
So... (3 Replies)
Discussion started by: Fred63528
3 Replies
10. Shell Programming and Scripting
Experts,
I'm having problems with the code below.
I'm trying to test $var2 for two different regexs.
I thought it could be done per below, but I'm getting the following error when running.
$ ./test.pl b fed50c0100****
Unescaped left brace in regex is deprecated, passed through in regex; marked... (2 Replies)
Discussion started by: timj123
2 Replies
LEARN ABOUT DEBIAN
solarpowerlog
SOLARPOWERLOG(1) SOLARPOWERLOG(1)
NAME
solarpowerlog - queries data from a photovoltaic inverter
SYNOPSIS
solarpowerlog [options]
DESCRIPTION
The program trackd and logd data from photovoltaic inverters, collect power data and store them.
OPTIONS
The program follow the usual GNU command line syntax, with long options starting with two dashes (`-'). A summary of options is included
below.
-h, --help
Show summary of options.
-v, --version
Show version of program.
-b, --background
Runs the program in the background, detaching it from the console.
-c, --conf filename
The configuration to be used. Default is solarpowerlog.conf, looked for in the current directory.
--dumpcfg
Dump configuration structure, then exit
--chdir arg
working directory for daemon (only used when running as a daemon). Defaults to /
--stdout arg
redirect stdout to this file (only used when running as a daemon). Defaults to /dev/null
--stderr arg
redirect stderr to this file (only used when running as a daemon). Defaults to /dev/null
--pidfile arg
create a pidfile after the daemon has been started. (only used when running as a daemon). Default: no pid file
SEE ALSO
http://sourceforge.net/apps/mediawiki/solarpowerlog/index.php
June 16, 2009 SOLARPOWERLOG(1)