05-28-2008
thank you, here how can we search with ignore case using awk' /^test/' ?
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
for example:
searches only for single word
for single word
this is line three
match=$(grep -n -e "single" data.txt)
this command will stored "..... single ...... single" into search.
how can i grep the single word just from line 2 only?? (3 Replies)
Discussion started by: blurboy
3 Replies
2. Shell Programming and Scripting
if i have a file that contains common directory
-bash-3.2$ cat test
/opt
/opt/mdm
/opt/test
-bash-3.2$
how can i grep "/opt" so that the result should only show "/opt" (6 Replies)
Discussion started by: ryandegreat25
6 Replies
3. UNIX Desktop Questions & Answers
I'm having trouble with extracting certain lines from a file based on whether they have all the required fields.
Original file:
snt:594:Sam N This
bpt:2342:Bob P That
lr:123
wrp:23:Whoever Person
cor:794
Desired output:
snt:594:Sam N This
bpt:2342:Bob P That
wrp:23:Whoever Person
... (3 Replies)
Discussion started by: Chthonic
3 Replies
4. Shell Programming and Scripting
Is there a way to grep only one line from a file listing name of files?
If I use head -1 it's ok(the first line only)
If I use head -2 it's not good because I have already checked the first line.
I'd like something like this:
while test $i -le $max
do
grep "$3" `head -$i temp.txt` >... (4 Replies)
Discussion started by: Max89
4 Replies
5. UNIX for Dummies Questions & Answers
Hi everyone.
I am a newbie to Linux stuff. I have this kind of problem which couldn't solve alone. I have a text file with records separated by empty lines like this:
ID: 20
Name: X
Age: 19
ID: 21
Name: Z
ID: 22
Email: xxx@yahoo.com
Name: Y
Age: 19
I want to grep records that... (4 Replies)
Discussion started by: Atrisa
4 Replies
6. Shell Programming and Scripting
Hi
i have a file which have a pattern like this
Nov 10 session closed
Nov 10 Nov 9 08:14:27 EST5EDT 2010 on tty .
Nov 10 Oct 19 02:14:21 EST5EDT 2010 on pts/tk .
Nov 10 afrtetryytr
Nov 10 session closed
Nov 10 Nov 10 03:21:04 EST5EDT 2010
Dec 8 Nov 10 05:03:02 EST5EDT 2010
... (13 Replies)
Discussion started by: Himanshu_soni
13 Replies
7. Shell Programming and Scripting
Suppose i have the following data :
cat file.txt
12431,123334,55353,546646,14342234,4646,35234
123123,3535,123434,132535,1234134,13535,123534
123213,545465,23434,45646,2342345,4656,31243
2355425,2134324,53425,342,35235,23434,234535
3423424,234234,65465,,2344,35436,234524,234... (7 Replies)
Discussion started by: Ravi Tej
7 Replies
8. Shell Programming and Scripting
Hi
This is my first post and I'm just a beginner. So please be nice to me.
I have a couple of html files where a pattern beginning with "http://www.site.com" and ending with "/resource.dat" is present on every 241st line. How do I extract this to a new text file?
I have tried sed -n 241,241p... (13 Replies)
Discussion started by: dejavo
13 Replies
9. Shell Programming and Scripting
Hi guys,
I am running a while loop in a script ro read a file line by line.
Now I want to run a grep only on the lines below the line I am that is being read by the while loop.
Eg:
If my while loop is on line 4 of the file, the grep only runs below line 4 and does not include line 1,2... (3 Replies)
Discussion started by: Junaid Subhani
3 Replies
10. Shell Programming and Scripting
Hello,
I know there are many questions and replies regarding grep command.
What I would like to do is a bit different.
File A:
hello world welcome to my page
this is my test site
how are you
I am fine, thank you
where have you been
I was in hospital
really hope you are fine now
Thanks,... (10 Replies)
Discussion started by: baris35
10 Replies
LEARN ABOUT REDHAT
ud.conf
UD.CONF(5) File Formats Manual UD.CONF(5)
NAME
ud.conf - ud configuration file
SYNOPSIS
/etc/openldap/ud.conf
DESCRIPTION
The ud configuration file is used to set system-wide defaults to be applied when running ud. Note that each user may specify an optional
configuration file, .udrc, in his/her home directory which will be used instead of the system-wide configuration file.
OPTIONS
The different configuration options are:
HOST <name>
Used to specify the name of an LDAP server to which ud should connect. There may be only one entry per config file. The
server's name can be specified as a domain-style name or an IP address.
BASE <base>
Used to specify the search base to use when performing search operations. The base may be changed by those using ud by using the
cb command. There may be only one entry per config file. The base must be specified as a Distinguished Name in LDAP format.
GROUPBASE <base>
Used to specify the base used when creating groups. The base may be changed by those using ud by using the changegroup command.
There may be only one entry per config file. The base must be specified as a Distinguished Name in LDAP format.
SEARCH <algorithm>
Used to specify a search algorithm to use when performing searches. More than one algorithm may be specified, and each is tried
in turn until a suitable response is found.
Each algorithm specifies a filter that should be used when performing a find operation. Filters contain LDAP-style attribute
types (e.g., uid, cn, postalAddress) and operators to test for equality or approximate equality. Prefix operators may also be
used to specify AND, OR and NOT operations (see ldap(3) for more details on the filter format). Algorithms use a compile-time
constant as a separator to use when parsing the input the user has provided. This parsed input can then be referenced similarly
to an awk program using symbols like $1, $2, and $0 for the entire batch of input.
For example, the algoritm cn=$0 causes ud to perform a lookup on the entire string the user has typed, searching for anything
where the commonName exactly matches the whole thing.
Another example, sn~=$NF causes ud to do a search where the last element the user has typed (NF = number of fields and is a spe-
cial "number" that can be used in awk as well as ud) searching for any matches that approximately match Surname.
Search algorithms also support a special feature which allows one to specify the exact number of fields that must be present in
order for the algorithm to be applied. This number must be specified between square brackets.
For example, [1] uid=$1 causes this algorithm to be applied when the number of fields is exactly equal to one. If there is
exactly one field, the token is looked up as a UID.
FILES
/etc/openldap/ud.conf
SEE ALSO
ud(1), ldap(3)
AUTHOR
Bryan Beecher, University of Michigan
ACKNOWLEDGEMENTS
OpenLDAP is developed and maintained by The OpenLDAP Project (http://www.openldap.org/). OpenLDAP is derived from University of Michigan
LDAP 3.3 Release.
4.3 Berkeley Distribution 20 August 2000 UD.CONF(5)