Sponsored Content
Full Discussion: need help in IF condition!!
Top Forums Shell Programming and Scripting need help in IF condition!! Post 302179733 by era on Friday 28th of March 2008 11:21:31 AM
Old 03-28-2008
unilover: you have the logic backwards, it's zero in the else branch.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

if condition ...

i have following if condition if above statement is case sensitive.....what is syntax if i have to make above comparision case insensetive (4 Replies)
Discussion started by: mahabunta
4 Replies

2. Shell Programming and Scripting

if condition

Hi friends, :) In a shell script i found the following if condition. echo -n "Which version of $1 do you want to restore ('0' to quit)? : " read desired if ${desired:=1} -ge $index ] ; then echo "$0: Restore canceled by user: index value too big." >&2 exit 1 fi Can... (1 Reply)
Discussion started by: ravi raj kumar
1 Replies

3. Shell Programming and Scripting

if..else condition

i have a paramter data_date in which i am passing a string value.i want to find out another paramter file_date from this.the logic is given below if day of data_date = sunday or monday then file_date=data_date-1 else file_date=data_date-2 i am passing data_date as 20061027. how can i... (3 Replies)
Discussion started by: dr46014
3 Replies

4. Shell Programming and Scripting

If Condition

Hi, I am trying to execute this command, but is it not working, says "`;' unexpected" eval $lgrep $SAM_CMD ; if ; then ; echo "No Error" ; fi What i want is, return the command output, if it is non zero, say "No Error". Thanks, John. (21 Replies)
Discussion started by: john_prince
21 Replies

5. HP-UX

Difference between [condition] and [[condition]] and ((condition)) when used with if condition

Executed the following if conditions .. and got different results . only (( )) gave correct o/p with all scenarios . Can anybody please let me know what is the difference between and ] and ((condition)) when used with if condition. And why each condition gave different result. 1.... (2 Replies)
Discussion started by: soumyabubun
2 Replies

6. Shell Programming and Scripting

redirect stdout echo command in condition A run in condition B

hi, I have some problems in my simple script about the redirect echo stdout command inside a condition. Why is the echo command inside the elif still execute in the else command Here are my simple script After check on the two diff output the echo stdout redirect is present in two diff... (3 Replies)
Discussion started by: jao_madn
3 Replies

7. Shell Programming and Scripting

if condition

if chr1:109457160 1 109457160 99.1735537190083 + chr1:109457233 1 109457233 99.1735537190083 - chr1:109457614 1 109457614 99.1735537190083 + chr1:109457618 1 109457618 100 + chr1:109457943 1 109457943 100 - chr1:109458224 1 109458224 99.1735537190083 - file1.txt If 6th column in... (3 Replies)
Discussion started by: johnkim0806
3 Replies

8. Shell Programming and Scripting

If condition return 0 even when it fails to satisfy te condition

HI My doubt may be basic one but I need to get it clarified.. When i use "if" condition that checks for many AND, OR logical conditions like if ]; then return 0 fi Even the if condition fails it returns as zero.. Any clue.. But if i add else condition like if ]; ... (2 Replies)
Discussion started by: Priya Amaresh
2 Replies

9. UNIX for Dummies Questions & Answers

IF [ condition ] help

Hi all Unix newbie - please be gentle Am modifying an existing script to error trap a variable with a length of 0 #!/bin/bash ipfile='/var/data/bin/ipaddress' ] && ipold="$(< "$ipfile" )" ipnew="$( wget -q -O - checkip.dyndns.org | sed -e 's/.*Current IP Address: //;s/<.*$//' )" #... (6 Replies)
Discussion started by: CRChamberlain
6 Replies

10. Shell Programming and Scripting

Help with if condition

o/p of my command is given below My requirement is if Pnumber is 0 then stabilization.Build.2013 else stabilization.PBuild.2013.3 (11 Replies)
Discussion started by: nikhil jain
11 Replies
GBP-PQ(1)						      git-buildpackage Manual							 GBP-PQ(1)

NAME
gbp-pq - Manage quilt patches on patch queue branches in git SYNOPSIS
gbp-pq [ --verbose ] [ --color=[auto|on|off] ] [ --[no-]patch-numbers ] [ --topic=topic ] [ --time-machine=num ] drop | export | import | rebase | switch DESCRIPTION
gbp-pq helps one to manage quilt patches in Debian packages that are maintained with git-buildpackage. This is especially useful with pack- ages using the 3.0 (quilt) source format. With gbp-pq you can maintain the quilt patches that should be applied to a package on a separate branch called patch-queue branch. So if your Debian package lives on master the associated patch-queue branch will be called patch- queue/master. See <URL:https://honk.sigxcpu.org/piki/development/debian_packages_in_git/> for example workflows. ACTIONS
import Create a patch queue branch from quilt patches in debian/patches/ that are listed in debian/patches/series. export Export the patches on the patch-queue branch associated to the current branch into a quilt patch series in debian/patches/ and update the series file. rebase Switch to the patch-queue branch associated to the current branch and rebase it against the current branch. drop Drop (delete) the patch queue associated to the current branch. So if you're on branch foo this would drop branch patch-queue/foo. apply Add a single patch to the patch-queue similar to using git-am. Use --topic if you want the patch to appear in a separate subdir when exporting the patch queue using export. This can be used to separate upstream pathes from debian specific patches. switch Switch to the patch-queue branch if on the base branch and switch to base branch if on patch-queue branch. OPTIONS
--verbose -v verbose execution --color=[auto|on|off] Whether to use colored output. --[no-]patch-numbers Whether the patch files should start with a number or not. --topic=topic Topic to use when importing a single patch --time-machine=NUM When importing a patch queue fails, go back commit by commit on the current branch to check if the patch-queue applies there. Do this at most NUM times. This can be useful if the patch-queue doesn't apply to the current branch HEAD anymore, e.g. after import- ing a new upstream version. TAGS
When exporting patches from a patch-queue branch gbp-pq will look at the patch header for special tags it recognizes. All tags need to start at the first column and require at least one whitespace after the colon. Gbp-Pq-Topic: topic Moves the patch into a subdir called topic when running gbp-pq export . This allows for some structure below debian/patches. SEE ALSO
git-buildpackage(1), dpkg-source(1), quilt(1), gbp.conf(5) AUTHOR
Guido Guenther <agx@sigxcpu.org> 01 June 2012 GBP-PQ(1)
All times are GMT -4. The time now is 08:40 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy