Sponsored Content
Full Discussion: Sample FOR loop question
Top Forums Shell Programming and Scripting Sample FOR loop question Post 302295787 by Yogesh Sawant on Monday 9th of March 2009 02:54:15 PM
Old 03-09-2009
try changing this:
Code:
chmod a+r ${HOME}/public_html/${FILE}

to this:
Code:
chmod a+r ${HOME}/public_html${FILE}

 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Loop question

hi, how would i go about making a loop which gets each line from a single text file, set it to a variable and then print it to screen? thanks eg: #!/bin/sh FILE="somefile.txt" text_line="" what kind of loop would use here? (18 Replies)
Discussion started by: strike
18 Replies

2. Shell Programming and Scripting

while loop question

while do print What is the next device number to be added to $dgroup? print Press \<Enter\> if there are no more devices to be added. read dev_num export dev_num symld -g $dgroup -sid $sname add dev $dev_num done In this while... (2 Replies)
Discussion started by: stepnkev
2 Replies

3. Shell Programming and Scripting

For Loop Question

Hi, I am writing a bash shell script. I will have a section of code devoted to a for loop: for FILE in *.hdf *.L2; do echo hello world done The complication is that sometimes there will not be any files with a ".hdf" extension, or sometimes there won't be any with a ".L2" extension. Since... (4 Replies)
Discussion started by: msb65
4 Replies

4. Shell Programming and Scripting

BASH loop inside a loop question

Hi all Sorry for the basic question, but i am writing a shell script to get around a slightly flaky binary that ships with one of our servers. This particular utility randomly generates the correct information and could work first time or may work on the 12th or 100th attempt etc !.... (4 Replies)
Discussion started by: rethink
4 Replies

5. Shell Programming and Scripting

loop question

hey guys what im trying to do is do a simple script that will ask for a password and on the 5th time it says access denied if the right password is still not entered this is what i have so far can anyone help me im not good with scripting thanks in advance #!/bin/bash secretname=secret... (2 Replies)
Discussion started by: randallrivy11
2 Replies

6. Shell Programming and Scripting

For Loop Question

I am struggling with the for loop. I have a file name heros.txt and I would like to go through a list in file where.txt and see if I can find the name from where inside heros. One of the problems that I am having is I dont understand how to setup the for loop to find the list to search.:wall: ... (6 Replies)
Discussion started by: captaindoogles
6 Replies

7. Shell Programming and Scripting

For loop question

Hi, I'm trying to put together a small script that will read a txt file that contains a list of two columns. Each column is the name of a folder.. e.g. AIX Server1 AIX Server2 AIX Server3 $ for i in `cat /opt/apacheprod/scripts/input/copy_list.txt` do PLATFORMVAR=`awk ' { print $1 } '... (7 Replies)
Discussion started by: Jazmania
7 Replies

8. Shell Programming and Scripting

While loop Question

Hi, I have a requirement where I have to check for 10 files in Unix location. If all of the files present in that directory then i have execute another process. can you help me resolving this issue. sample location /home/usr abc.txt cde.txt aaaa.txt lll.txt ooo.txt if all the... (3 Replies)
Discussion started by: manasvi24
3 Replies

9. UNIX for Dummies Questions & Answers

Loop question

Hi, I would really appreciate some help with manipulating a file. Here is my input file: SNP_1 : 1 SNP_11 : 1 SNP_2 -0.12 1 SNP_12 -0.3472 1 SNP_3 -0.708 1 SNP_13 0.5037 1 SNP_4 1.492 0.5 SNP_14 -0.0685 1 SNP_5 1.27 0.5 SNP_15 0.547 ... (3 Replies)
Discussion started by: zajtat
3 Replies

10. UNIX for Dummies Questions & Answers

Question about for loop

Hi, I have code like below disk_list=$(ls /root/file1) for disk in $disk_list do pvcreate $i done I know what pvcreate command does, but I do not understand what this $i do here. can someone please explain. (2 Replies)
Discussion started by: stew
2 Replies
Locale::Codes::LangVar(3pm)				 Perl Programmers Reference Guide			       Locale::Codes::LangVar(3pm)

NAME
Locale::Codes::LangVar - standard codes for language variation identification SYNOPSIS
use Locale::Codes::LangVar; $lvar = code2langvar('acm'); # $lvar gets 'Mesopotamian Arabic' $code = langvar2code('Mesopotamian Arabic'); # $code gets 'acm' @codes = all_langvar_codes(); @names = all_langvar_names(); DESCRIPTION
The "Locale::Codes::LangVar" module provides access to standard codes used for identifying language variations, such as those as defined in the IANA language registry. Most of the routines take an optional additional argument which specifies the code set to use. If not specified, the default IANA language registry codes will be used. SUPPORTED CODE SETS
There are several different code sets you can use for identifying language variations. A code set may be specified using either a name, or a constant that is automatically exported by this module. For example, the two are equivalent: $lvar = code2langvar('en','alpha-2'); $lvar = code2langvar('en',LOCALE_CODE_ALPHA_2); The codesets currently supported are: alpha This is the set of alphanumeric codes from the IANA language registry, such as 'arevela' for Eastern Armenian. This code set is identified with the symbol "LOCALE_LANGVAR_ALPHA". This is the default code set. ROUTINES
code2langvar ( CODE [,CODESET] ) langvar2code ( NAME [,CODESET] ) langvar_code2code ( CODE ,CODESET ,CODESET2 ) all_langvar_codes ( [CODESET] ) all_langvar_names ( [CODESET] ) Locale::Codes::LangVar::rename_langvar ( CODE ,NEW_NAME [,CODESET] ) Locale::Codes::LangVar::add_langvar ( CODE ,NAME [,CODESET] ) Locale::Codes::LangVar::delete_langvar ( CODE [,CODESET] ) Locale::Codes::LangVar::add_langvar_alias ( NAME ,NEW_NAME ) Locale::Codes::LangVar::delete_langvar_alias ( NAME ) Locale::Codes::LangVar::rename_langvar_code ( CODE ,NEW_CODE [,CODESET] ) Locale::Codes::LangVar::add_langvar_code_alias ( CODE ,NEW_CODE [,CODESET] ) Locale::Codes::LangVar::delete_langvar_code_alias ( CODE [,CODESET] ) These routines are all documented in the Locale::Codes::API man page. SEE ALSO
Locale::Codes The Locale-Codes distribution. Locale::Codes::API The list of functions supported by this module. http://www.iana.org/assignments/language-subtag-registry The IANA language subtag registry. AUTHOR
See Locale::Codes for full author history. Currently maintained by Sullivan Beck (sbeck@cpan.org). COPYRIGHT
Copyright (c) 2011-2013 Sullivan Beck This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself. perl v5.18.2 2014-01-06 Locale::Codes::LangVar(3pm)
All times are GMT -4. The time now is 04:39 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy