03-13-2009
I am storing the execution status of a command in the var variable. The snippet goes like this :
#running ant command
ant -f ../../../build.xml
#storing the ant command execution status
var=`echo $?`
#if ant executes successfully file name stores to success file
#or else file name stored into failed file. (line has read from another files assume it workes fine and it contains a file name simply)
if [ $var -eq 0 ]; then
echo $line
echo $line >> successful_build.txt;
echo $?
else
echo $line >> failed_services.txt
fi
so this is it is.
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi all
I have tried to search for this, but keep getting a MySQL db connect error, so am posing the question here, and taking a risk of incurring the wrath of the mods with my first post...
I have the following test script:
#!/bin/bash
HTTPD=`/bin/ps -axcu | /usr/bin/grep httpd... (6 Replies)
Discussion started by: mikie
6 Replies
2. Shell Programming and Scripting
Hi,
I have an embedded Perl construct in a korn script. However, I cannot seem to access the shell variables that were declared outside this Perl section.
This is how my script is written....I have also tried back-ticks where I assign the shell variable to my local perl variable, still... (1 Reply)
Discussion started by: svetlur
1 Replies
3. Shell Programming and Scripting
Hi Guys,
could someone tell me what this ksh construct does
typeset -r PROG_PWD=${0%/*} does
I understand the -r for readonly but I would very much appreciate a definitive account of what this will set $PROG_PWD to.
If I run this at the cmd line it it gets set to /usr/bin but I would... (2 Replies)
Discussion started by: ajcannon
2 Replies
4. Shell Programming and Scripting
Hi
can anyone tell me why is this code giving error
mode=$1
if ] || ] then
echo "MODES:"
exit 1
fi
Thanks (5 Replies)
Discussion started by: Anteus
5 Replies
5. Shell Programming and Scripting
I'd like to create a variable with the value of X number of space( no Perl please), printf seems to work, but , in following example,10 spaces becomes 1 space when assinged to a variable, Why? other solutions are welcome.
$printf "=%10s=\n"
= =
$var=$(printf "=%10s=\n")
echo... (4 Replies)
Discussion started by: honglus
4 Replies
6. Shell Programming and Scripting
Hi all
i have been trying to do a small 'question and answer' script using if-else statement and a combination of pipe. I have succeeded in allowing the user to login with user name and password stored in a sequence username/password in a file named "pass" like this:
echo "please enter your... (14 Replies)
Discussion started by: arikutex
14 Replies
7. UNIX for Dummies Questions & Answers
Please help me out: I've seen this construct
awk '{...}1'several times, like in scrutinizer's today's post
awk '{for(i=2;i<=NF;i++)if($i==$1)$i=RS $i}1' infilebut I can't find (manuals, man pages, internet FAQs,...) an explanation of what it does resp. stands for. Any hint is appreciated! (5 Replies)
Discussion started by: RudiC
5 Replies
8. Shell Programming and Scripting
Hi,
I need to construct the below path from the two available directory path,
O/P
/home/data/test/run/ht/WEB/HTML
/home/data/test/run/ht/WEB/JSP
/home/data/test/run/ht/WEB/CSS
Path:1
------
/home/data/test/run/
Path:2
------
/home/data/share/app/01/lang/ht/WEB/HTML... (5 Replies)
Discussion started by: vel4ever
5 Replies
9. Shell Programming and Scripting
Hi,
I don't understand && and || in this context. I thought && is for logical 'AND' and || is for logical 'OR'.
&& echo "Not empty" || echo "Empty"
Please help
Thank You (5 Replies)
Discussion started by: TomG
5 Replies
10. Shell Programming and Scripting
Hi all,
I thought this would be simple, but I've been having a lot of trouble trying to write this IF statement, if I may ask for help pls:
In BASH, how would I construct the if statement:
Should ONLY be true if USEROPTscript=="yes"]] AND $mode=="INSTALL" /or/ $mode=="CHANGE" ]]... (3 Replies)
Discussion started by: jmccoughlin
3 Replies
LEARN ABOUT DEBIAN
ant-phone
ant-phone(1) ANT Manual Pages ant-phone(1)
NAME
ant-phone - an interactive ISDN telephone application
SYNOPSIS
ant-phone [options]
DESCRIPTION
ant-phone is part of ANT (ANT is Not a Telephone). It let's you make and receive telephone calls and talk via sound devices. It uses CAPI
2.0 as ISDN interface.
OPTIONS
ant-phone accepts the following options:
-h, --help
Show summary of options
-v, --version
Print version information
-r, --cleanup
Remove stale socket file left by accident by a previous run of ANT. You only need this option if ANT says: "local bind: Address
already in use"
-d, --debug[=debuglevel]
Print additional runtime debugging data to stdout, debuglevel = 1..4
-i, --soundin=device
ALSA device name for input (recording), default: "default"
-o, --soundout=device
ALSA device name for output (playback), default: "default"
-m, --msn=msn
identifying MSN (for outgoing calls), 0 for master MSN of this termination/port, default: 0
-l, --msns=msns
MSNs to listen on, semicolon-separated list or '*', default: *
-c, --call=number
Make a running instance of ANT make a call to the specified number, useful for calling from an external address book application
-s, --sleep
Shut down CAPI connection to prepare for removal of broken kernel modules, which don't survive suspend/restore.
-w, --wakeup
Restore CAPI connection after ISDN modules loaded again. The connection will be also restored by dialing a number, but before the
connection is restored, you won't be able to accept calls.
NOTES
If the used sound devices (arguments of --soundin and --soundout) are equal, a full duplex sound device is needed.
FILES
~/.ant-phone/history
the last dialed numbers
~/.ant-phone/options
user specific options file
~/.ant-phone/callerid
saved history of incoming and outgoing calls
~/.ant-phone/recordings/*
recordings of recorded phone calls
BUGS
Caller ID stores hangup reason localized. This will break, if someone uses letters outside of English alphabet for translation of hangup
reasons.
AUTHORS
ANT was developed by Roland Stigge <stigge@antcom.de>, based on ideas from IVCALL, Copyright 2002 Lennart Poettering. G.711 handling by Sun
Microsystems. Contributions by Joerg Mayer <jmayer@loplof.de>, Lars Volkhardt <Lars.Volkhardt@uni-konstanz.de>, Ivan Schreter
<schreter@gmx.net>.
Version 0.1.0 27 April 2003 ant-phone(1)