Sponsored Content
Top Forums Shell Programming and Scripting read contents of a file with serveral lines & assign it to a variable Post 302351957 by satyam.sumit on Thursday 10th of September 2009 04:45:58 AM
Old 09-10-2009
read contents of a file with serveral lines & assign it to a variable

Hi All

I have a file for ex .log file which contain several lines within it.
I have to read that file contents & assing that to a variable.
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

How to Read a config file and Assign to Variable

I have removeConfig file, it contains the dir paths for removing. I need to read line by line and assign to variable. any idea? (1 Reply)
Discussion started by: redlotus72
1 Replies

2. Shell Programming and Scripting

Read a file and assign the values to a variable

i have a file in this format curyymm PRVYYMM CDDMmmYY bddMmmyy eddMmmyy --------- ------- ------------ ---------- ----------- 0906 0905 09Jun09 01Jun09 30Jun09 ----------- --------- ------------ ------------ ----------- i need to read the... (5 Replies)
Discussion started by: depakjan
5 Replies

3. Shell Programming and Scripting

Read the csv file and assign the values in to variable

I have a csv file with the values seperated by commas.I want to extract these values one by one and assign to a variable using shell script.Any ideas or code? (11 Replies)
Discussion started by: rajbal
11 Replies

4. Shell Programming and Scripting

PHP read large string & split in multidimensional arrays & assign fieldnames & write into MYSQL

Hi, I hope the title does not scare people to look into this thread but it describes roughly what I'm trying to do. I need a solution in PHP. I'm a programming beginner, so it might be that the approach to solve this, might be easier to solve with an other approach of someone else, so if you... (0 Replies)
Discussion started by: lowmaster
0 Replies

5. Shell Programming and Scripting

How to write script read file and assign it as variable?

Hi all, I want write a csh script which must be able: 1.read a file 2.assign value in file as variable and can i use read in csh script? thx (2 Replies)
Discussion started by: proghack
2 Replies

6. Shell Programming and Scripting

How to read contents of a file into variable :(

My file is in this format : username : student information : default shell : student ID Eg : joeb:Joe Bennett:/bin/csh:1234 jerryd:Jerry Daniels:/bin/csh:2345 deaverm: Deaver Michelle:/bin/bash:4356 joseyg:Josey Guerra:/bin/bash:8767 michaelh:Michael Hall:/bin/ksh:1547 I have to... (1 Reply)
Discussion started by: dude_me5
1 Replies

7. Homework & Coursework Questions

How to read contents of a file into variable :(

Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted! 1. The problem statement, all variables and given/known data: I have to read the contents of each field of a file creating user accounts. The file will be of format : ... (6 Replies)
Discussion started by: dude_me5
6 Replies

8. UNIX for Advanced & Expert Users

How to read a text file and assign the values in the same to a variable in loop

Hi, I have a text file with multiple lines, each having data in the below format <DOB>,<ADDRESS> I have to write a script which reads each line in the text file in loop, assign the values to these variables and do some further processing in it. Using the following code prints the values... (12 Replies)
Discussion started by: manishab00
12 Replies

9. 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

10. Shell Programming and Scripting

Do While Loop + Read From File + assign line to a variable

Hello, I am using below code for reading from a file and assigning the values to a variable , but it is loosing the value after the loop , please suggest to retain the value of the variable after the loop , while IFS=: read -r line do set $dsc=$line echo 'printing line variable ' $line... (1 Reply)
Discussion started by: ParthThakkar
1 Replies
BLD.CONF(5)							File Formats Manual						       BLD.CONF(5)

NAME
bld.conf - Configuration file for BLD DESCRIPTION
bld.conf consists of lines used to set various configuration options for bld. The lines are processed in order of appearance. Options set via bld.conf are overriden by bld command line options. If two lines assign different values to the same variables, the last is used. Blank lines and lines beginning with a `#' are ignored. bld.conf lines have the following format: variable = value variable can be on of the following: o daemon: (0 or 1) fork to background or not. o address: IP address to bind to. o port: port to listen to. o min_interval: minimum time interval before blacklisting. o max_submissions: maximum submissions in time interval. o ip_list_size: IP list size. o blacklist_size: blacklist size. o blacklist_expiration: blacklist expiration (seconds). o log_level: log level. o user: user to run as. o group: group to run as. o client_timeout: client idle timeout before closing connection (seconds). o iplist_dump: file to dump IP list to. o blacklist_dump: file to dump blacklist to. o pid_filename: PID filename. o acl_filename: ACL filename. o whitelist_filename: whitelist filename. o notifies_to: comma separated hosts (`hostname' or `hostname:port') to notify when a new address is inserted into the blacklist NOTES
You need to completely restart bld after any modification of this file. FILES
/etc/bld/bld.conf SEE ALSO
bld(8) bld_acl.conf(5) bld_whitelist.conf(5) AUTHOR
Olivier Beyssac <obld@r14.freenix.org> October 2004 BLD.CONF(5)
All times are GMT -4. The time now is 12:54 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy