Sponsored Content
Full Discussion: Help With A For Loop Issue
Top Forums Shell Programming and Scripting Help With A For Loop Issue Post 302110839 by ralts01 on Thursday 15th of March 2007 09:56:24 PM
Old 03-15-2007
Thanks for the replys I'll give those suggestions a try.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

while loop issue

Hi, Following is my code and the file FILE_LIST_EXCESS.txt has 40 file names in it while read LineIn do echo ${LineIn} `ftp -vin << END_INPUT >> ${PID}_DS_GET_Log.log 2>&1 open servername user userid password cd FileDir get ${LineIn} END_INPUT`... (4 Replies)
Discussion started by: mgirinath
4 Replies

2. Shell Programming and Scripting

loop issue

I have 2 files one of them has all the all mac addresses and the other one has all the ip addresses. Basically, I want to loop thru those 2 files and generate a configuration like below: host www184.domain.com { hardware ethernet 00:13:72:3B:B4:3A; fixed-address 192.168.0.184; }... (4 Replies)
Discussion started by: kkkk
4 Replies

3. Shell Programming and Scripting

loop issue

function ext { echo "THANKS & WELCOME BACK" } function upc { echo "TO EXPORT UPROC GIVE UPROC NAME PER LINE IN THE input.txt and PRESS Y" echo "TO GO BACK PRESS 99" read parm0 if ; then start elif ; then for i in `cat input.txt` ; do echo $i $UXEXE/uxext upr upr=$i... (0 Replies)
Discussion started by: kojo
0 Replies

4. Shell Programming and Scripting

until loop issue.

Hi, my script is waiting for 3 files to come to a folder for 30 min but even when all the files arrive in the folder it's still waiting for these three files. Files can come with in 2 min and I want it to start processing them immediately after all the files arrive in the folder. until ; do... (3 Replies)
Discussion started by: gurpartap
3 Replies

5. Shell Programming and Scripting

for-while loop issue

sup experts..i had a script which was bugging me..was hoping someone could point out the issue here Input file: space separated 2 columns I wanted to print out the 2 columns after assigning them to variables ( bascially the same output but iterate through line by line ). The code worked... (7 Replies)
Discussion started by: foal_newbie
7 Replies

6. Shell Programming and Scripting

Issue with using While loop

Hi, I am trying to move a file from remote server to local server and when the transfer completes successfully i call a script in remote server to remove the file which was successfully transferred. I do this by first getting the list of file in remote server and move the text file to local... (8 Replies)
Discussion started by: funonnet
8 Replies

7. Shell Programming and Scripting

While Loop issue

Hi, i=0 t5=6000001 while do i=`expr $i + 1` t5=`expr $t5 + 1` echo $t5 done I am able to increment "col3" value but unable to get col1,col2 value. Input: t1=10001 t2=abc t3=ghkc (5 Replies)
Discussion started by: onesuri
5 Replies

8. Shell Programming and Scripting

Issue with while loop?

Hi, I have prepared a script to search for backup file information on the Linux server. Script works fine for the most part except the echo statement inside an IF conditional block displays the message ''snapshot directory not found on xxxxx" even though the .snapshot directory is found a... (11 Replies)
Discussion started by: svajhala
11 Replies

9. Shell Programming and Scripting

Issue with for loop

Hi Team, I have for loop in my shell script. Which basically loop through all files in the directory, When some files are in the directory it works just fine. But if there are no files at all..still the for loop try to execute. Please help. Below is the code. #!/bin/ksh echo "Program... (5 Replies)
Discussion started by: bharath561989
5 Replies

10. UNIX for Beginners Questions & Answers

Issue when doing a loop

Hi, I just have started learning shell scripting (sh). Why do i only get the date? while read dt do echo "Date : ${dt} sed -n '/${dt}/,/${dt}/p' file1.log | grep -w ERROR done < date1.dat INPUT - date1.dat 2019-04-05 04:58:25 2019-04-05 04:58:26 2019-04-05 05:00:56... (3 Replies)
Discussion started by: margel
3 Replies
Perl::Critic::Policy::Variables::ProhibitEvilVariables(3User Contributed Perl DocumentatiPerl::Critic::Policy::Variables::ProhibitEvilVariables(3)

NAME
Perl::Critic::Policy::Variables::ProhibitEvilVariables - Ban variables that aren't blessed by your shop. AFFILIATION
This Policy is part of the core Perl::Critic distribution. DESCRIPTION
Use this policy if you wish to prohibit the use of specific variables. These may be global variables warned against in "perlvar", or just variables whose names you do not like. CONFIGURATION
The set of prohibited variables is configurable via the "variables" and "variables_file" options. The value of "variables" should be a string of space-delimited, fully qualified variable names and/or regular expressions. An example of prohibiting two specific variables in a .perlcriticrc file: [Variables::ProhibitEvilVariables] variables = $[ $^S $SIG{__DIE__} If you prohibit an array or hash (e.g. @INC), use of elements of the array or hash will be prohibited as well. If you specify a subscripted variable (e.g. $SIG{__DIE__}), only the literal subscript specified will be detected. The above <.perlcritic> file, for example, will cause "perlcritic (1)" to detect "$SIG{__DIE__} = &foo", but not my $foo = '__DIE__'; $SIG{$foo} = &foo; Regular expressions are identified by values beginning and ending with slashes. Any variable with a name that matches "m/pattern/sm" will be forbidden. For example: [Variables::ProhibitEvilVariables] variables = /acme/ would cause all variables that match "m/acme/" to be forbidden. If you want a case-blind check, you can use (?i: ... ). For example [Variables::ProhibitEvilVariables] variables = /(?i:acme)/ forbids variables that match "m/acme/smi". In addition, you can override the default message ("Prohibited variable "variable" used") with your own, in order to give suggestions for alternative action. To do so, put your message in curly braces after the variable name or regular expression. Like this: [Variables::ProhibitEvilVariables] variables = $[ {Found use of $[. Program to base index 0 instead} If your message contains curly braces, you can enclose it in parentheses, angle brackets, or square brackets instead. Similarly, the "variables_file" option gives the name of a file containing specifications for prohibited variables. Only one variable specification is allowed per line and comments start with an octothorp and run to end of line; no curly braces are necessary for delimiting messages: $[ # Prohibit the "$[" variable and use the default message. # Prohibit the "$^S" variable and give a replacement message. $^S Having to think about $^S in exception handlers is just wrong # Use a regular expression. /acme/ No coyotes allowed. By default, there are no prohibited variables, although I can think of a few that should be. See "perldoc perlvar" for a few suggestions. RESTRICTIONS
Variables of the form "${^foo}" are not recognized by PPI as of version 1.206. When PPI recognizes these, this policy will Just Work for them too. Only direct references to prohibited variables and literal subscripts will be recognized. For example, if you prohibit $[, the first line in my $foo = $[; $$foo = 1; will be flagged as a violation, but not the second, even though the second, in fact, assigns to $[. Similarly, if you prohibit $SIG{__DIE__}, this policy will not recognize my $foo = '__DIE__'; $SIG{$foo} = sub {warn 'I cannot die!'}; as an assignment to $SIG{__DIE__}. NOTES
This policy leans heavily on Perl::Critic::Policy::Modules::ProhibitEvilModules by Jeffrey Ryan Thalhammer. AUTHOR
Thomas R. Wyant, III wyant at cpan dot org COPYRIGHT
Copyright (c) 2009-2011 Thomas R. Wyant, III This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. The full text of this license can be found in the LICENSE file included with this module. perl v5.16.3 2014-06-09 Perl::Critic::Policy::Variables::ProhibitEvilVariables(3)
All times are GMT -4. The time now is 12:38 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy