Sponsored Content
Top Forums Shell Programming and Scripting printing each line in a file X times Post 302420131 by Autumn Tree on Monday 10th of May 2010 05:46:19 PM
Old 05-10-2010
Thanks you guys rock!
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

printing a line of a file

I am trying to write a script that when triggered by an ip address it will run the following export DAVIDCOUNT=`(fgrep -ce 140.147.146.146 /export/home/ipconnect.txt) >> /local/cron/test_listen_out`; I think this is my problem line. What I like this line to do is when it sees the... (6 Replies)
Discussion started by: clay
6 Replies

2. Shell Programming and Scripting

printing an empty line in a file (perl)

I know this must be really easy, but i can't get it to work I've got a perl script, with a file. I want to print an empty line, and the following doesn't seem to work: print nameoffile "\n" thanks for your help!! (3 Replies)
Discussion started by: kfad
3 Replies

3. UNIX for Dummies Questions & Answers

Printing a Line from a file

I have a log file with several lines as follows: Aug 30 06:35:08 trnwvltfit1 /usr/lib/snmp/snmpdx: Agent snmpd appeared dead but responded to ping I am using the date of the line to determine which lines to print. However, I am only trying to print the parts of the line that are NOT... (4 Replies)
Discussion started by: Nysif Steve
4 Replies

4. Shell Programming and Scripting

Re-write first line of a file before printing

Morning All, Quite a simple one this, I hope. What I want to do is to re-write the first line of a file before it's sent to print. The line will be blank initially, and I want to insert some text. The operation can either be done on the file itself (modifying the file on disk), OR in a... (2 Replies)
Discussion started by: alexop
2 Replies

5. Shell Programming and Scripting

printing strings in one X number of times from another

I have one file of numbers 4 5 2 ... And another file of strings aaaaa bbbbb ccccc ddddd eeeee ffffff ... I'd like to print the stings from each line in reverse order with some decoration the number of times listed in the first file such as: Yeah bbbbb aaaaa Yeah bbbbb aaaaa (5 Replies)
Discussion started by: dcfargo
5 Replies

6. UNIX for Advanced & Expert Users

printing specific line from a file.

The below line gives the perfect output when I mention the record number and file name as hardcoded. awk 'NR==3{print}' samp2.txt But when I pass the record num and file name as variable, it doesn't give any output. row_num=3;file2=samp2.txt;awk 'NR==$row_num {print}' $file2 Can you... (2 Replies)
Discussion started by: siba.s.nayak
2 Replies

7. Shell Programming and Scripting

Printing a particular line to a file

Hi, I have a file in which the entries are of the following type: 5649 S 1 0412 S 0 0423 S 1 0020 N 0 0020 N 0 1022 S 1 1022 S 1 I need to print the whole line which is having 0 in the third column into a different file Thanks... (6 Replies)
Discussion started by: swasid
6 Replies

8. UNIX and Linux Applications

Printing a line in a file

Hi I have a file having multiple lines. I want to print a particular line. How can I do this? Thanks in advance Ananth (5 Replies)
Discussion started by: Ananthdoss
5 Replies

9. Programming

Printing same strIng many times

In python how we need to print a same string many times without using loop. I cane across something like * operator for this . How we Can use this in a print statement ? I am using python 3.x Please help me (7 Replies)
Discussion started by: pandeesh
7 Replies

10. Shell Programming and Scripting

Printing string from last field of the nth line of file to start (or end) of each line (awk I think)

My file (the output of an experiment) starts off looking like this, _____________________________________________________________ Subjects incorporated to date: 001 Data file started on machine PKSHS260-05CP ********************************************************************** Subject 1,... (9 Replies)
Discussion started by: samonl
9 Replies
zone2ldap(1)						      General Commands Manual						      zone2ldap(1)

NAME
zone2ldap /- Load BIND 9 Zone files into LDAP Directory SYNOPSIS
zone2ldap [-D Bind DN] [-w Bind Password] [-b Base DN] [-z Zone] [-f Zone File ] [-h Ldap Host] [-cd] [-v] DESCRIPTION
zone2ldap will parse a complete BIND 9 format DNS zone file, and load the contents into an LDAP directory, for use with the LDAP sdb back- end. If the zone already exists, zone2ldap will exit succesfully. If the zone does not exists, or partially exists, zone2ldap will attempt to add all/missing zone data. Options -b LDAP Base DN. LDAP systems require a "base dn", which is generally considered the LDAP Directory root. If the zone you are loading is different from the base, then you will need to tell zone2ldap what your LDAP base is. -v Print version information, and immediatly exit. -f Zone file. Bind 9.1 compatible zone file, from which zone information will be read. -d Dump debug information to standard out. -w LDAP Bind password, corresponding the the value of "-b". -h LDAP Directory host. This is the hostname of the LDAP system you wish to store zone information on. An LDAP server should be lis- tening on port 389 of the target system. This may be ommited, and will default to "localhost". -c This will create the zone portion of the DN you are importing. For instance, if you are creating a domain.com zone, zone2ldap should first create "dc=domain,dc=com". This is useful if you are creating multiple domains. -z This is the name of the zone specified in the SOA record. EXAMPLES
Following are brief examples of how to import a zone file into your LDAP DIT. Loading zone domain.com, with an LDAP Base DN of dc=domain,dc=com zone2ldap -D dc=root -w secret -h localhost -z domain.com -f domain.com.zone This will add Resource Records into an ALREADY EXISTING dc=domain,dc=com. The final SOA DN in this case, will be dc=@,dc=domain,dc=com Loading customer.com, if your LDAP Base DN is dc=provider,dc=net. zone2ldap -D dc=root -w secret -h localhost -z customer.com -b dc=provider,dc=net -f customer.com.zone -c This will create dc=customer,dc=com under dc=provider,dc=net, and add all necessary Resource Records. The final root DN to the SOA will be dc=@,dc=customer,dc=com,dc=provider,dc=net. SEE ALSO
named(8) ldap(3) http://www.venaas.no/ldap/bind-sdb/ BUGS
Send all bug reports to Jeff McNeil <jeff@snapcase.g-rock.net> AUTHOR
Jeff McNeil <jeff@snapcase.g-rock.net> 8 March 2001 zone2ldap(1)
All times are GMT -4. The time now is 09:35 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy