Sponsored Content
Full Discussion: Do loop doesn't iterate
Top Forums Shell Programming and Scripting Do loop doesn't iterate Post 302820409 by Scott on Wednesday 12th of June 2013 03:33:22 PM
Old 06-12-2013
You set a variable called cmd. Then what? Where do you "run" it? And what is $Program?
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Why script For...Loop doesn't work. Seek help

I have written a script to run on UNIX server. When I tested, it always hanged on after "date +"%D %T: XXXXXX script started." part. Then it wouldn't go further. UNIX server gave me one error message. I used the same code in another script. It works fine. I think the major problem may be in... (3 Replies)
Discussion started by: duke0001
3 Replies

2. UNIX for Dummies Questions & Answers

a for loop that doesn't make sense

I've been referring bash info for processes and came across a structure for a process which is defined like typedef struct process { struct process *next; char ** argv . . . }process; What I don't understand is that in the program there's a for loop which goes like this job... (2 Replies)
Discussion started by: sdsd
2 Replies

3. Shell Programming and Scripting

for loop doesn't work

I have a script which uses below for loop: for (( i = 0 ; i <= 5; i++ )) do echo "Welcome $i times" done But when I run the script, it gives error message: Syntex Error : Bad for loop variable Can anyone guide to run it? Thanks in advance. (10 Replies)
Discussion started by: naw_deepak
10 Replies

4. Shell Programming and Scripting

Why doesn't this loop end?

Simple script, takes an cmd line argument and counts down to 1. NUMBER=$1 # One argument must be provided, otherwise don't execute if then echo "Error. Enter one argument " exit 0 elif then echo " " fi # Integer value must be greater than zero while do echo... (6 Replies)
Discussion started by: Breakology
6 Replies

5. Shell Programming and Scripting

Script doesn't work in loop but does if not

I have a script that only works if I remove it from the looping scenario. #!/bin/bash # Set the field seperator to a newline ##IFS=" ##" # Loop through the file ##for line in `cat nlist.txt`;do # put the line into a variable. ##dbuser=$line echo "copying plugin..." ... (6 Replies)
Discussion started by: bugeye
6 Replies

6. Shell Programming and Scripting

Nested While loop doesn't end

Hi, Below is my script in which i am using nested while loop to read two files and move the files to a remote server. My issue is that the 2nd while loop doesn't stop executing and it keeps on executing. Can someone please let me know where i have gone wrong. myFile=$ESER_TEST_FILES ... (2 Replies)
Discussion started by: funonnet
2 Replies

7. Shell Programming and Scripting

How to loop(Iterate) through List with foreach(csh)

Hey all,, I know cshell is harmful:) but I am using this just "to know" - for educational purposes!... not for a long-term use. lets say i have a list.. set arr=(x y z e f) I wanna iterate the list with foreach ,, not with while.!! foreach i $arr echo $i end does not work (2 Replies)
Discussion started by: eawedat
2 Replies

8. UNIX for Dummies Questions & Answers

Iterate/Loop Through XML Node List

I need to load an XML file and loop through a list of nodes in it to execute a shell script for each one using the attributes for each node as parameters for the script. Any ideas? Any help will be much appreciated. (1 Reply)
Discussion started by: bradlecat
1 Replies

9. Shell Programming and Scripting

Iterate array using loop over ssh

A simple script: #!/bin/bash test=test test1=(test1 test2 test3) echo ${test1 } ssh server 'echo '$test'; echo '${test1 }' ; echo '${test1}' ; for m in $(seq 1 $(echo '${test1 }' | tr " " "\n" | wc -l)); do echo $m ; echo '${test1}'; done'Here is the result: test1 test2 test3 testing... (5 Replies)
Discussion started by: mharald
5 Replies

10. Shell Programming and Scripting

Using nested for loop to iterate over file names

I'm trying to grab a list of file names from a directory, then process those files 5 at a time. In the link below. Instead of using files I'm using the files array which contains 15 strings starting with AAA. So I'm trying to assign $fileset 5 of the strings at a time to pass to a command. So... (4 Replies)
Discussion started by: zBernie
4 Replies
IRDADUMP(8)															       IRDADUMP(8)

NAME
irdadump - monitors the IrDA traffic on one or more links. SYNOPSIS
irdadump [ -b ] [ -c n ] [ -d ] [ -x ] [ -s n ] [ -t ] [ -l ] [ -v ] [ -i device ] OPTIONS
-b dump bytes in columns -c n set snapcols for byte printing with -b option -d prints the time difference between the current and the previous frame -x dump frame (bytes and ascii) -s n set snaplen for -b and -x option -t force TTP decoding of unknown connections -l set line buffering on output file -v verbose -i device interface DESCRIPTION
irdadump is a tool for monitoring the IrDA traffic on one or more links. Just write "make" to compile the program. When you run the pro- gram, you should be able to see the IrDA traffic (if any). One advantage of implementing IrDA device drivers as network device drivers is that you should be able to attach sniffers to the device (or actually the packet type). That way, it is possible to use a really handy utility called irdadump (instead of tcpdump). This will make debugging MUCH easier. Linux-2.2 implements the BPF (Berkeley Packet Filter), so its possible to filter out exactly the frames you want to see. You may use hostname to separate different machines names. Or grep to filter the output, too. irdadump must be run as root or installed setuid root, as it requires root privileges. EXAMPLES
The output should look something like this: / # ./irdadump 20:11:45.412199 xid:cmd 0x0015c23b > 0xffffffff S=6 s=0 20:11:45.492137 xid:cmd 0x0015c23b > 0xffffffff S=6 s=1 20:11:45.572137 xid:cmd 0x0015c23b > 0xffffffff S=6 s=2 20:11:45.652208 xid:cmd 0x0015c23b > 0xffffffff S=6 s=3 20:11:45.732137 xid:cmd 0x0015c23b > 0xffffffff S=6 s=4 20:11:45.812137 xid:cmd 0x0015c23b > 0xffffffff S=6 s=5 20:11:45.892175 xid:cmd 0x0015c23b > 0xffffffff S=6 s=255 Linux 20:11:45.902362 xid:rsp 0xf7be8388 < 0x0015c23b S=6 s=5 ACTiSYS IR100M 20:11:48.412197 xid:cmd 0x0015c23b > 0xffffffff S=6 s=0 20:11:48.492656 xid:cmd 0x0015c23b > 0xffffffff S=6 s=1 20:11:48.572177 xid:cmd 0x0015c23b > 0xffffffff S=6 s=2 20:11:48.652169 xid:cmd 0x0015c23b > 0xffffffff S=6 s=3 20:11:48.732177 xid:cmd 0x0015c23b > 0xffffffff S=6 s=4 20:11:48.812153 xid:cmd 0x0015c23b > 0xffffffff S=6 s=5 20:11:48.822371 xid:rsp 0xf7be8388 < 0x0015c23b S=6 s=4 ACTiSYS IR100M 15 packets received by filter Turning on the "-d" option will make irdadump print the time difference between the current and the previous frame: / # ./irdadump -d 20:11:18.412475 (0982.06 ms) xid:cmd 0x0015c23b > 0xffffffff S=6 s=0 20:11:18.492345 (0079.87 ms) xid:cmd 0x0015c23b > 0xffffffff S=6 s=1 20:11:18.572376 (0080.03 ms) xid:cmd 0x0015c23b > 0xffffffff S=6 s=2 20:11:18.652979 (0080.60 ms) xid:cmd 0x0015c23b > 0xffffffff S=6 s=3 20:11:18.732354 (0079.38 ms) xid:cmd 0x0015c23b > 0xffffffff S=6 s=4 20:11:18.755093 (0022.74 ms) xid:rsp 0xf7be8388 < 0x0015c23b S=6 s=3 ACTiSYS IR100M 20:11:18.812350 (0057.26 ms) xid:cmd 0x0015c23b > 0xffffffff S=6 s=5 20:11:18.892518 (0080.17 ms) xid:cmd 0x0015c23b > 0xffffffff S=6 s=255 Linux 20:11:21.412486 (2519.97 ms) xid:cmd 0x0015c23b > 0xffffffff S=6 s=0 20:11:21.492395 (0079.91 ms) xid:cmd 0x0015c23b > 0xffffffff S=6 s=1 20:11:21.572368 (0079.97 ms) xid:cmd 0x0015c23b > 0xffffffff S=6 s=2 20:11:21.652405 (0080.04 ms) xid:cmd 0x0015c23b > 0xffffffff S=6 s=3 20:11:21.732458 (0080.05 ms) xid:cmd 0x0015c23b > 0xffffffff S=6 s=4 irdadump must be run as root or installed setuid root, as it requires root privileges. irdadump -d -x -s 256 will check the contents of the frames. This should tell us if the frames have malformed content, or if the irda stack is doing something wrong. DIAGNOSTICS
N.N. BUGS
N.N. SEE ALSO
irattach(8), irdaping(8), irdadump(8), findchip(8), irpsion5(8), modprobe(8) Linux/IrDA Project http://irda.sourceforge.net -*- Linux/IrDA-Tutorial http://www.hpl.hp.com/personal/Jean_Tourrilhes/IrDA/index.html -*- Infrared-HOWTO http://tuxmobil.org/howtos.html AUTHOR
This manual page is written by Werner Heuser <wehe@tuxmobil.org>. It is based on the READMEs from irda-utils by the Linux/IrDA Project and the Linux/IrDA-Tutorial. COPYRIGHT
Copyright (c) 2001 Werner Heuser Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License (GFDL), Version 1.1 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts and no Back-Cover Texts. 03 July 2006 IRDADUMP(8)
All times are GMT -4. The time now is 08:39 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy