Sponsored Content
Top Forums Shell Programming and Scripting Assign values to variables of a file Post 302385485 by Tuxidow on Friday 8th of January 2010 08:09:16 AM
Old 01-08-2010
ok i will restate the qn. i think i was not clear before.

i have a template file like below..

Code:
CUST=
DIR=
NUFILE=
XXXXXXX
XXXXXXx
XXXXXXX

For each user i need to create a file with these entries filled.

so for a user named onida i should have a file onida.txt with these fields added.

Code:
CUST=onida
DIR=/dir/onida
NULIST=/tmp/onida_files
name=philps_123
XXXXXXX
XXXXXXx
XXXXXXX

 

10 More Discussions You Might Find Interesting

1. Programming

how do u assign the values to different variables when it is presneted in one line??

hey people.. i have a configuration file that looks like 7080 7988 net04.xxxxx.edu 20 where 20 is the number of threads in the thread pool initially. net04.xxxxx.edu is the hostname. and 7080 7988 are two ports. first one for client requests and second one for dns communication. now my... (2 Replies)
Discussion started by: SwetaShah
2 Replies

2. Shell Programming and Scripting

How do I assign values to variables made in a script?

How do I assign values to variables made in a script? e.g. for ((x=0;x<=5;i+=1)); do Xm$i=$var done (0 Replies)
Discussion started by: gelitini
0 Replies

3. Shell Programming and Scripting

how can i read text file and assign its values to variables using shell

Hello, I have a cat.dat file, i would like shell to read each 3 lines and set this 3 lines to 3 different variables. my cat.dat is: 11 12 +380486461001 12 13 +380486461002 13 14 +380486461003 i want shell to make a loop and assign 1st line to student_id, 2nd line to... (4 Replies)
Discussion started by: rosalinda
4 Replies

4. Shell Programming and Scripting

Assign Values to variables from a text file

The text file has one single row and looks like this Q1 P1 2006 I have to pick up this values from a shell script into three different variables, say quarter, period and year from the above text file. Some one know's how to do this? I went through 'sed', dint really know how to... (3 Replies)
Discussion started by: sarsani
3 Replies

5. Shell Programming and Scripting

Need to parse lines in a file into two words and assign the values to two variables

For example, I have a file with below lines containing VOB tags and VOB paths. * /vobs/fts/FTSUSM20_VOB /ccvobsslx01/projects/vobs/eml/FTSUSM20_VOB * /vobs/fts/FTS20_VOB /ccvobsslx01/projects/vobs/eml/FTS20_VOB * /vobs/pmv/PMS_VOB /ccvobsslx01/projects/vobs/cpm/_/PMS_VOB *... (4 Replies)
Discussion started by: senthilkc
4 Replies

6. Shell Programming and Scripting

Read variables names from array and assign the values

Hi, I have requirement to assign values to variables which are created dynamically. Below is the code which i am using to achieve above requirement. #!/bin/ksh oIFS="$IFS"; IFS=',' STR_FAIL_PARENT_IF_FAILS="WF_F_P_IF_FAILS1,WF_F_P_IF_FAILS2,WF_F_P_IF_FAILS3" set -A... (1 Reply)
Discussion started by: tmalik79
1 Replies

7. Shell Programming and Scripting

Read record from the text file & assign those values to variables in the script

For eg: I have sample.txt file with 4 rows of record like: user1|password1 user2|password2 user3|password3 user4|password4 The username and password is sepsrated by '|' I want to get the 1st row value from the file and assign it to two different variables(username and password) in my... (1 Reply)
Discussion started by: priya001
1 Replies

8. Shell Programming and Scripting

Read record from the text file contain multiple separated values & assign those values to variables

I have a file containing multiple values, some of them are pipe separated which are to be read as separate values and some of them are single value all are these need to store in variables. I need to read this file which is an input to my script Config.txt file name, first path, second... (7 Replies)
Discussion started by: ketanraut
7 Replies

9. Shell Programming and Scripting

A better way to assign values to variables - shell

so i've been used to doing it this way: SVAL=$(echo "7 3 2 38 3" | awk '{print $2}') 4VAL=$(echo "4:21:N:3" | awk -F":" '{print $4}') I know there's a way to do it by putting the value in an array and assigning it that way. but i'm not sure how to do it efficiently. any ideas? i dont... (9 Replies)
Discussion started by: SkySmart
9 Replies

10. Shell Programming and Scripting

Assign Unknown Values to Variables

i have a program that spits out a certain number of values. i dont know the number of values. they can be 4, 10, 7, 20, no idea. but, i want to be able to assign each of the value returned by this program to a variable. in the latest instance, the program gave the following 6 values: 4... (8 Replies)
Discussion started by: SkySmart
8 Replies
DateTime::Locale::ru(3) 				User Contributed Perl Documentation				   DateTime::Locale::ru(3)

NAME
DateTime::Locale::ru SYNOPSIS
use DateTime; my $dt = DateTime->now( locale => 'ru' ); print $dt->month_name(); DESCRIPTION
This is the DateTime locale package for Russian. DATA
This locale inherits from the DateTime::Locale::root locale. It contains the following data. Days Wide (format) XXXXXXXXXXX XXXXXXX XXXXX XXXXXXX XXXXXXX XXXXXXX XXXXXXXXXXX Abbreviated (format) XX XX XX XX XX XX XX Narrow (format) X X X X X X X Wide (stand-alone) XXXXXXXXXXX XXXXXXX XXXXX XXXXXXX XXXXXXX XXXXXXX XXXXXXXXXXX Abbreviated (stand-alone) XX XX XX XX XX XX XX Narrow (stand-alone) X X X X X X X Months Wide (format) XXXXXX XXXXXXX XXXXX XXXXXX XXX XXXX XXXX XXXXXXX XXXXXXXX XXXXXXX XXXXXX XXXXXXX Abbreviated (format) XXX. XXXX. XXXXX XXX. XXX XXXX XXXX XXX. XXXX. XXX. XXXX. XXX. Narrow (format) X X X X X X X X X X X X Wide (stand-alone) XXXXXX XXXXXXX XXXX XXXXXX XXX XXXX XXXX XXXXXX XXXXXXXX XXXXXXX XXXXXX XXXXXXX Abbreviated (stand-alone) XXX. XXXX. XXXX XXX. XXX XXXX XXXX XXX. XXXX. XXX. XXXX. XXX. Narrow (stand-alone) X X X X X X X X X X X X Quarters Wide (format) 1-X XXXXXXX 2-X XXXXXXX 3-X XXXXXXX 4-X XXXXXXX Abbreviated (format) 1-X XX. 2-X XX. 3-X XX. 4-X XX. Narrow (format) 1 2 3 4 Wide (stand-alone) 1-X XXXXXXX 2-X XXXXXXX 3-X XXXXXXX 4-X XXXXXXX Abbreviated (stand-alone) 1-X XX. 2-X XX. 3-X XX. 4-X XX. Narrow (stand-alone) 1 2 3 4 Eras Wide XX X.X. X.X. Abbreviated XX X.X. X.X. Narrow XX X.X. X.X. Date Formats Full 2008-02-05T18:30:30 = XXXXXXX, 5 XXXXXXX 2008 X. 1995-12-22T09:05:02 = XXXXXXX, 22 XXXXXXX 1995 X. -0010-09-15T04:44:23 = XXXXXXX, 15 XXXXXXXX -10 X. Long 2008-02-05T18:30:30 = 5 XXXXXXX 2008 X. 1995-12-22T09:05:02 = 22 XXXXXXX 1995 X. -0010-09-15T04:44:23 = 15 XXXXXXXX -10 X. Medium 2008-02-05T18:30:30 = 05.02.2008 1995-12-22T09:05:02 = 22.12.1995 -0010-09-15T04:44:23 = 15.09.-010 Short 2008-02-05T18:30:30 = 05.02.08 1995-12-22T09:05:02 = 22.12.95 -0010-09-15T04:44:23 = 15.09.-10 Default 2008-02-05T18:30:30 = 05.02.2008 1995-12-22T09:05:02 = 22.12.1995 -0010-09-15T04:44:23 = 15.09.-010 Time Formats Full 2008-02-05T18:30:30 = 18:30:30 UTC 1995-12-22T09:05:02 = 9:05:02 UTC -0010-09-15T04:44:23 = 4:44:23 UTC Long 2008-02-05T18:30:30 = 18:30:30 UTC 1995-12-22T09:05:02 = 9:05:02 UTC -0010-09-15T04:44:23 = 4:44:23 UTC Medium 2008-02-05T18:30:30 = 18:30:30 1995-12-22T09:05:02 = 9:05:02 -0010-09-15T04:44:23 = 4:44:23 Short 2008-02-05T18:30:30 = 18:30 1995-12-22T09:05:02 = 9:05 -0010-09-15T04:44:23 = 4:44 Default 2008-02-05T18:30:30 = 18:30:30 1995-12-22T09:05:02 = 9:05:02 -0010-09-15T04:44:23 = 4:44:23 Datetime Formats Full 2008-02-05T18:30:30 = XXXXXXX, 5 XXXXXXX 2008 X. 18:30:30 UTC 1995-12-22T09:05:02 = XXXXXXX, 22 XXXXXXX 1995 X. 9:05:02 UTC -0010-09-15T04:44:23 = XXXXXXX, 15 XXXXXXXX -10 X. 4:44:23 UTC Long 2008-02-05T18:30:30 = 5 XXXXXXX 2008 X. 18:30:30 UTC 1995-12-22T09:05:02 = 22 XXXXXXX 1995 X. 9:05:02 UTC -0010-09-15T04:44:23 = 15 XXXXXXXX -10 X. 4:44:23 UTC Medium 2008-02-05T18:30:30 = 05.02.2008 18:30:30 1995-12-22T09:05:02 = 22.12.1995 9:05:02 -0010-09-15T04:44:23 = 15.09.-010 4:44:23 Short 2008-02-05T18:30:30 = 05.02.08 18:30 1995-12-22T09:05:02 = 22.12.95 9:05 -0010-09-15T04:44:23 = 15.09.-10 4:44 Default 2008-02-05T18:30:30 = 05.02.2008 18:30:30 1995-12-22T09:05:02 = 22.12.1995 9:05:02 -0010-09-15T04:44:23 = 15.09.-010 4:44:23 Available Formats d (d) 2008-02-05T18:30:30 = 5 1995-12-22T09:05:02 = 22 -0010-09-15T04:44:23 = 15 Ed (E d) 2008-02-05T18:30:30 = XX 5 1995-12-22T09:05:02 = XX 22 -0010-09-15T04:44:23 = XX 15 EEEd (d EEE) 2008-02-05T18:30:30 = 5 XX 1995-12-22T09:05:02 = 22 XX -0010-09-15T04:44:23 = 15 XX H (H) 2008-02-05T18:30:30 = 18 1995-12-22T09:05:02 = 9 -0010-09-15T04:44:23 = 4 HHmm (HH:mm) 2008-02-05T18:30:30 = 18:30 1995-12-22T09:05:02 = 09:05 -0010-09-15T04:44:23 = 04:44 HHmmss (HH:mm:ss) 2008-02-05T18:30:30 = 18:30:30 1995-12-22T09:05:02 = 09:05:02 -0010-09-15T04:44:23 = 04:44:23 Hm (H:mm) 2008-02-05T18:30:30 = 18:30 1995-12-22T09:05:02 = 9:05 -0010-09-15T04:44:23 = 4:44 hm (h:mm a) 2008-02-05T18:30:30 = 6:30 PM 1995-12-22T09:05:02 = 9:05 AM -0010-09-15T04:44:23 = 4:44 AM Hms (H:mm:ss) 2008-02-05T18:30:30 = 18:30:30 1995-12-22T09:05:02 = 9:05:02 -0010-09-15T04:44:23 = 4:44:23 hms (h:mm:ss a) 2008-02-05T18:30:30 = 6:30:30 PM 1995-12-22T09:05:02 = 9:05:02 AM -0010-09-15T04:44:23 = 4:44:23 AM M (L) 2008-02-05T18:30:30 = 2 1995-12-22T09:05:02 = 12 -0010-09-15T04:44:23 = 9 Md (d.M) 2008-02-05T18:30:30 = 5.2 1995-12-22T09:05:02 = 22.12 -0010-09-15T04:44:23 = 15.9 MEd (E, M-d) 2008-02-05T18:30:30 = XX, 2-5 1995-12-22T09:05:02 = XX, 12-22 -0010-09-15T04:44:23 = XX, 9-15 MMdd (dd.MM) 2008-02-05T18:30:30 = 05.02 1995-12-22T09:05:02 = 22.12 -0010-09-15T04:44:23 = 15.09 MMM (LLL) 2008-02-05T18:30:30 = XXXX. 1995-12-22T09:05:02 = XXX. -0010-09-15T04:44:23 = XXXX. MMMd (d MMM) 2008-02-05T18:30:30 = 5 XXXX. 1995-12-22T09:05:02 = 22 XXX. -0010-09-15T04:44:23 = 15 XXXX. MMMEd (E MMM d) 2008-02-05T18:30:30 = XX XXXX. 5 1995-12-22T09:05:02 = XX XXX. 22 -0010-09-15T04:44:23 = XX XXXX. 15 MMMMd (d MMMM) 2008-02-05T18:30:30 = 5 XXXXXXX 1995-12-22T09:05:02 = 22 XXXXXXX -0010-09-15T04:44:23 = 15 XXXXXXXX MMMMEd (E MMMM d) 2008-02-05T18:30:30 = XX XXXXXXX 5 1995-12-22T09:05:02 = XX XXXXXXX 22 -0010-09-15T04:44:23 = XX XXXXXXXX 15 mmss (mm:ss) 2008-02-05T18:30:30 = 30:30 1995-12-22T09:05:02 = 05:02 -0010-09-15T04:44:23 = 44:23 ms (mm:ss) 2008-02-05T18:30:30 = 30:30 1995-12-22T09:05:02 = 05:02 -0010-09-15T04:44:23 = 44:23 y (y) 2008-02-05T18:30:30 = 2008 1995-12-22T09:05:02 = 1995 -0010-09-15T04:44:23 = -10 yM (yyyy-M) 2008-02-05T18:30:30 = 2008-2 1995-12-22T09:05:02 = 1995-12 -0010-09-15T04:44:23 = -010-9 yMEd (EEE, yyyy-M-d) 2008-02-05T18:30:30 = XX, 2008-2-5 1995-12-22T09:05:02 = XX, 1995-12-22 -0010-09-15T04:44:23 = XX, -010-9-15 yMMM (MMM y) 2008-02-05T18:30:30 = XXXX. 2008 1995-12-22T09:05:02 = XXX. 1995 -0010-09-15T04:44:23 = XXXX. -10 yMMMEd (E, d MMM y) 2008-02-05T18:30:30 = XX, 5 XXXX. 2008 1995-12-22T09:05:02 = XX, 22 XXX. 1995 -0010-09-15T04:44:23 = XX, 15 XXXX. -10 yMMMM (MMMM y) 2008-02-05T18:30:30 = XXXXXXX 2008 1995-12-22T09:05:02 = XXXXXXX 1995 -0010-09-15T04:44:23 = XXXXXXXX -10 yQ (Q y) 2008-02-05T18:30:30 = 1 2008 1995-12-22T09:05:02 = 4 1995 -0010-09-15T04:44:23 = 3 -10 yQQQ (y QQQ) 2008-02-05T18:30:30 = 2008 1-X XX. 1995-12-22T09:05:02 = 1995 4-X XX. -0010-09-15T04:44:23 = -10 3-X XX. yyMM (MM.yy) 2008-02-05T18:30:30 = 02.08 1995-12-22T09:05:02 = 12.95 -0010-09-15T04:44:23 = 09.-10 yyMMM (MMM yy) 2008-02-05T18:30:30 = XXXX. 08 1995-12-22T09:05:02 = XXX. 95 -0010-09-15T04:44:23 = XXXX. -10 yyMMMEEEd (EEE, d MMM yy) 2008-02-05T18:30:30 = XX, 5 XXXX. 08 1995-12-22T09:05:02 = XX, 22 XXX. 95 -0010-09-15T04:44:23 = XX, 15 XXXX. -10 yyQ (Q yy) 2008-02-05T18:30:30 = 1 08 1995-12-22T09:05:02 = 4 95 -0010-09-15T04:44:23 = 3 -10 yyyy (y) 2008-02-05T18:30:30 = 2008 1995-12-22T09:05:02 = 1995 -0010-09-15T04:44:23 = -10 yyyyLLLL (LLLL y) 2008-02-05T18:30:30 = XXXXXXX 2008 1995-12-22T09:05:02 = XXXXXXX 1995 -0010-09-15T04:44:23 = XXXXXXXX -10 yyyyMM (MM.yyyy) 2008-02-05T18:30:30 = 02.2008 1995-12-22T09:05:02 = 12.1995 -0010-09-15T04:44:23 = 09.-010 yyyyMMMM (MMMM y) 2008-02-05T18:30:30 = XXXXXXX 2008 1995-12-22T09:05:02 = XXXXXXX 1995 -0010-09-15T04:44:23 = XXXXXXXX -10 yyyyQQQQ (QQQQ y 'X'.) 2008-02-05T18:30:30 = 1-X XXXXXXX 2008 X. 1995-12-22T09:05:02 = 4-X XXXXXXX 1995 X. -0010-09-15T04:44:23 = 3-X XXXXXXX -10 X. Miscellaneous Prefers 24 hour time? Yes Local first day of the week XXXXXXXXXXX SUPPORT
See DateTime::Locale. AUTHOR
Dave Rolsky <autarch@urth.org> COPYRIGHT
Copyright (c) 2008 David Rolsky. All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. This module was generated from data provided by the CLDR project, see the LICENSE.cldr in this distribution for details on the CLDR data's license. perl v5.16.3 2014-06-10 DateTime::Locale::ru(3)
All times are GMT -4. The time now is 03:15 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy