Sponsored Content
Top Forums Shell Programming and Scripting For loop - coping with an asterisk item Post 302135165 by PaulUrwin on Thursday 6th of September 2007 08:47:14 AM
Old 09-06-2007
Question For loop - coping with an asterisk item

How do you get a for loop to cope with one of the items being an asterisk?


for myResult in `echo "*"`
do
echo "$myResult"
done



The asterisk is returning a file listing in the PWD.

The same result can be got from:


for myResult in "*"
do
echo "$myResult"
done



How to I combat this? Smilie

Cheers.
 

We Also Found This Discussion For You

1. Shell Programming and Scripting

How to compare previous and current item in for loop in bash?

Hey, I am trying to compare formated login and logout dates from one user at a host which I have stored in a tmp directory in order to find out the total login time. I need to compare them in order to find overlapping intervals. At first I tried to store each log in and logo date in an array... (3 Replies)
Discussion started by: Mumu123
3 Replies
dahdi_test(8)						      System Manager's Manual						     dahdi_test(8)

NAME
dahdi_test -- Test if the DAHDI timer provides timely response SYNOPSIS
dahdi_test [ -v ] DESCRIPTION
dahdi_test dahdi_test runs a timing test in a loop and prints the result of each loop. The test is as follows: It reads 8192 bytes from the DAHDI timer device (/dev/dahdi/pseudo). This should take exactly 8000 ms . It uses calls to gettimeofday(2) before and after that read to check that indeed exactly 8000ms have passed. Values of 100% and 99.99% Are normally considered a definite pass. Values of 99.98% and 99.97% are probably OK as well. OPTIONS
-v Be more verbose: print one line per test. -c count Run for count times instead of running forever. FILES
/dev/dahdi/pseudo The device file used to access the DAHDI timer. SEE ALSO
dahdi_tool(8), dahdi_cfg(8), asterisk(8). gettimeofday(2) AUTHOR
This manual page was written by Tzafrir Cohen <tzafrir.cohen@xorcom.com> Permission is granted to copy, distribute and/or modify this docu- ment under the terms of the GNU General Public License, Version 2 any later version published by the Free Software Foundation. 2005-06-25 dahdi_test(8)
All times are GMT -4. The time now is 08:34 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy