Sponsored Content
Top Forums Shell Programming and Scripting Requesting input and for loop Post 302350726 by peterro on Friday 4th of September 2009 05:57:32 PM
Old 09-04-2009
What have you tried? There should be plenty of for loop examples on here to use as a guide.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

TCSH.need help.take input during a while/end loop

I am writting a script in csh and I am blanking out on how I code in the ability to process user input in the middle of a while/end loop. while(1) args.. end it is a simple script, and I want to add hotkey functions, like q to quit, z to zero counters, etc.. Google has not been very... (1 Reply)
Discussion started by: seg
1 Replies

2. Shell Programming and Scripting

input inside while read loop

Hi all Does anyone have a script that will allow me to stop inside a while read loop. I want to pause the loop until a enter is pressed. e.g. While read line do echo something if LINECOUNT > 40 then read ENTER?"PRESS ENTER TO CONT..." ... (3 Replies)
Discussion started by: jhansrod
3 Replies

3. Shell Programming and Scripting

need help with using input file in the while loop

here's my code: ls -lt | /usr/bin/egrep `date +"%Y%m%d(05|06|07|08|09|10|11|12|13|14|15|16|17|18|19)"` | \ /usr/bin/egrep -i .dat | /usr/bin/awk '{print $9}' > $LockboxFile1 if ] then ... (2 Replies)
Discussion started by: sytycd712
2 Replies

4. Shell Programming and Scripting

Loop until user input is correct

Hello, i know how to retrieve a user input (read), and how to manage the different options (case statement). But... could anybody show me a script that, if the user option is incorrect, don't allow to continue the excution, i.e., if the value entered is not 1 or 2, the script shows a question. ... (2 Replies)
Discussion started by: aristegui
2 Replies

5. Shell Programming and Scripting

Input redirection and for loop

Hello, I need help with a bash script that I try to improve. I could not find answer so far, maybe because I'm not to familiar with the terminology so feel free to correct my language. I have a script that looks like: NODES="node_a node_b node_c" for NODE in $NODES do ... (4 Replies)
Discussion started by: pn8830
4 Replies

6. Shell Programming and Scripting

Loop breaks on yes/no user input

I have a shell script, and its pretty much done, I decided to add a loop that ends or continues depending on user input. like "would you like to continue?" and if I hit y or yes it will run the loop again until I hit n or no and breaks out of the loop. To be hones I didn't think I needed to add... (2 Replies)
Discussion started by: Demon_Jester
2 Replies

7. UNIX for Dummies Questions & Answers

While loop, input from find command

Hello nix Experts, I am a *nix rookie and have run into this issue, can some one help me here and let me know what I am doing wrong. /home/user1> while read n > do > echo $n > done < <(find . -type f -ctime -1 | grep abc) I am getting the below error: -sh: syntax error near... (5 Replies)
Discussion started by: babyPen1985
5 Replies

8. Shell Programming and Scripting

Loop overwrite first input

function one { echo "Who is here?" read name   echo "Who old are you $name?" read age if ; then Sam="$age" else Sam="26" fi   if ; then Jack="$age" else Jack="49"... (4 Replies)
Discussion started by: samsan
4 Replies

9. Shell Programming and Scripting

While loop with input in a bash script

I have the following while loop that I put in a script, demo.sh: while read rna; do aawork=$(echo "${rna}" | sed -n -e 's/\(...\)\1 /gp' | sed -f rna.sed) echo "$aawork" | sed 's/ //g' echo "$aawork" | tr ' ' '\012' | sort | sed '/^$/d' | uniq -c | sed 's/*\(*\) \(.*\)/\2: \... (3 Replies)
Discussion started by: faizlo
3 Replies

10. Shell Programming and Scripting

For in loop - two input variables

When I create a newfile, I am using the filename as a variable to create the new filename. When I ouput it, the filename contains the file extension in the middle of the file example: router1.txtshcdpneighbors.txt router2.logshcdpneighbors.txt My initial approach was to strip it out, now I... (2 Replies)
Discussion started by: dis0wned
2 Replies
Test::Aggregate::Builder(3pm)				User Contributed Perl Documentation			     Test::Aggregate::Builder(3pm)

NAME
Test::Aggregate::Builder - Internal overrides for Test::Builder. VERSION
Version 0.364 SYNOPSIS
use Test::Aggregate::Builder; DESCRIPTION
WARNING: This module is for internal use only. DO NOT USE DIRECTLY. AUTHOR
Curtis Poe, "<ovid at cpan.org>" BUGS
Please report any bugs or feature requests to "bug-test-aggregate at rt.cpan.org", or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Test-Aggregate <http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Test-Aggregate>. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes. SUPPORT
You can find documentation for this module with the perldoc command. perldoc Test::Aggregate You can also look for information at: o AnnoCPAN: Annotated CPAN documentation http://annocpan.org/dist/Test-Aggregate <http://annocpan.org/dist/Test-Aggregate> o CPAN Ratings http://cpanratings.perl.org/d/Test-Aggregate <http://cpanratings.perl.org/d/Test-Aggregate> o RT: CPAN's request tracker http://rt.cpan.org/NoAuth/Bugs.html?Dist=Test-Aggregate <http://rt.cpan.org/NoAuth/Bugs.html?Dist=Test-Aggregate> o Search CPAN http://search.cpan.org/dist/Test-Aggregate <http://search.cpan.org/dist/Test-Aggregate> COPYRIGHT &; LICENSE Copyright 2007 Curtis "Ovid" Poe, all rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. perl v5.12.4 2011-08-27 Test::Aggregate::Builder(3pm)
All times are GMT -4. The time now is 01:50 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy