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
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
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
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
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
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
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
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
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
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
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
LEARN ABOUT DEBIAN
bld.conf
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)