Sponsored Content
Full Discussion: while condition error:
Top Forums Shell Programming and Scripting while condition error: Post 302623413 by kashif.live on Friday 13th of April 2012 01:29:30 PM
Old 04-13-2012
actually I m trying to check if there is any usb connected or not. if usb device is connect then fdisk will give me alot of information so i just decided to see if wc is zero then it will send email saying "No usb" and it will keep checking till usb connected. once usb is connected then fdisk will output something wc is not zero and it will stop sending email or any task that i want to do.

Last edited by kashif.live; 04-13-2012 at 02:36 PM..
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

When running if condition, getting the following error

Hi All, My input file name is 1.sh the contents of file are cat status2.txt | while read filename do echo "$filename" echo "first content of the file is ${filename}" echo "second content of the file is ${filename}" echo "second content of the file is ${filename}" if } -eq 0 -a... (1 Reply)
Discussion started by: sunitachoudhury
1 Replies

2. Shell Programming and Scripting

error in if-else condition

Hi.. Im using the following script to find whether the present day is monday or not. If it is monday it has to do a specific set of things. #!/bin/sh Present_Date=`date` LOAD_DAY=`date -d "$Present_Date" | cut -d " " -f 1` echo $LOAD_DAY if ;then echo "Monday" #statements;... (6 Replies)
Discussion started by: abala
6 Replies

3. Shell Programming and Scripting

If condition error-please debug my script

Hi All, I have a script which is based on calculating current time The script looks like this: whenever i try to run the script it gives me error:Please advice wherther i have made mistake with if condition or with for loop?? The code : set -x #!/usr/bin/ksh set -x... (7 Replies)
Discussion started by: usha rao
7 Replies

4. Shell Programming and Scripting

Error in if condition string comparison

Hello all! I need help in debugging following script. I have no idea where I am going wrong. #!/bin/bash for p1 in A1 TM MP do for p2 in A1 TM MP do for mp1 in N1 N2 do for mp2 in N1 N2 do for mp3 in N1 N2 do for mp4 in N1 N2 do for... (7 Replies)
Discussion started by: RLOA
7 Replies

5. Shell Programming and Scripting

Condition error!

Hi Guys, Can you please help me to check if my condition is correct. if && then if ; then # active SE_USERID_LUZON_5="A" elif ; then # not active SE_USERID_LUZON_5="D" ${ECHO_CMD}... (3 Replies)
Discussion started by: nikki1200
3 Replies

6. UNIX for Dummies Questions & Answers

error in if condition

Hi All, I need to compare the header of the input files which can be comma demilited, tild(~) or Pipr(|) seperated file. I am comparing the file header by taking 1st row and comparing it with input row: Below is the actual code:(ksh script) if then echo $dat >>... (4 Replies)
Discussion started by: abhi_123
4 Replies

7. Shell Programming and Scripting

Error: if condition

please follow below code if ; then its giving me an error as "test1.sh: line 3: r=$(eval echo '$lck_'$TABLE != "") if can anyone tell me how to do inside if condition...with out use any variable.. TIA (6 Replies)
Discussion started by: gnnsprapa
6 Replies

8. Shell Programming and Scripting

Handling standard error in condition

Testing this with KSH on RHEL The bellow code works but i can't seem to handle the exit status of the unix command when it fails... i wanted to put something like >/dev/null 2>&1 to manage standard output and standard error but it changes my logic and the code doesn't work cause it doesn't... (11 Replies)
Discussion started by: maverick72
11 Replies

9. Shell Programming and Scripting

If condition giving syntax error. Need help.

Hi, I have an if condition on executing it is giving syntax error as below: -------------------------------------------------------------------------------------- line 61: syntax error in conditional expression ./play_test.sh: line 61: syntax error near `]' ./play_test.sh: line 61: ` if... (2 Replies)
Discussion started by: ramki067
2 Replies

10. UNIX for Beginners Questions & Answers

If condition is not working and getting error

Hi Team, If condition is not working properly and getting below error # ./score1.sh Enter your score ('q' for quit): 102 Enter your score ('q' for quit): q ./score1.sh: line 9: q: integer expression expected Average is: 102%. Exit. Actual code # Calculate the average of given... (3 Replies)
Discussion started by: Torrid
3 Replies
XPP_SYNC(8)						User Contributed Perl Documentation					       XPP_SYNC(8)

NAME
xpp_sync - Handle sync selection of Xorcom Astribanks. SYNOPSIS
xpp_sync <auto|dahdi|nn> xpp_sync [-v] DESCRIPTION
On a normal operation one Astribank device provides timing for all the other Astribank devices. When run without parameters, xpp_sync will display a list of Astribanks (xbuses) that are connected and registered as Dahdi spans. The current xpp sync master will be marked. If you this an Astribank is connected and yet it does not appear on the output of xpp_sync, it may be unregistered. Try running dahdi_registration . Parameters auto Automatically selects the best Astribank for syncing. dahdi Gets synchronization from the Dahdi sync master. nn Sets XBUS-nn as sync source. -v Also print the numeric xpp sync rank. (Parameter name is case-insensitive) Example output: Setting SYNC Current sync: 01 Best Available Syncers: + XBUS-01 (usb-0000:00:10.4-3) [usb:12345678] [ PRI_TE PRI_NT PRI_TE PRI_NT ] XBUS-00 (usb-0000:00:10.4-2) [usb:QA-01] [ FXS FXO ] ================================================== WARNING: FXO which is not the syncer cause bad PCM Affected Astribanks are: -------------------------------------------------- XBUS-00 ================================================== In this example we see that the recommended xpp sync master is XBUS-02 - it is the first on the list. It is also the actual syncer, as we can see from the '+' beside it. xpp_sync is normally called from the dahdi init.d script. The parameter it is called with defaults to auto, but it is possible to override that parameter (e.g: set it to dahdi) through the value of XPP_SYNC in /etc/dahdi/init.conf . FILES
/proc/xpp/sync (Deprecated: no longer supported) xpp_sync is essentially a nicer interface to /proc/xpp/sync . That file shows the current xpp sync master (and in what format you need to write to it to set the master). SEE ALSO
dahdi_registration(1), dahdi_cfg(1), README.Astribank perl v5.14.2 2009-09-30 XPP_SYNC(8)
All times are GMT -4. The time now is 12:39 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy