Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

look(1) [v7 man page]

LOOK(1) 						      General Commands Manual							   LOOK(1)

NAME
look - find lines in a sorted list SYNOPSIS
look [ -df ] string [ file ] DESCRIPTION
Look consults a sorted file and prints all lines that begin with string. It uses binary search. The options d and f affect comparisons as in sort(1): d `Dictionary' order: only letters, digits, tabs and blanks participate in comparisons. f Fold. Upper case letters compare equal to lower case. If no file is specified, /usr/dict/words is assumed with collating sequence -df. FILES
/usr/dict/words SEE ALSO
sort(1), grep(1) LOOK(1)

Check Out this Related Man Page

LOOK(1) 						    BSD General Commands Manual 						   LOOK(1)

NAME
look -- display lines beginning with a given string SYNOPSIS
look [-dfa] [-t termchar] string [file] DESCRIPTION
The look utility displays any lines in file which contain string as a prefix. As look performs a binary search, the lines in file must be sorted (where sort(1) got the same options -d and/or -f that look is invoked with). If file is not specified, the file /usr/share/dict/words is used, only alphanumeric characters are compared and the case of alphabetic char- acters is ignored. Options: -d Dictionary character set and order, i.e. only alphanumeric characters are compared. -f Ignore the case of alphabetic characters. -a Use the alternate dictionary /usr/share/dict/web2 -t Specify a string termination character, i.e. only the characters in string up to and including the first occurrence of termchar are compared. The look utility exits 0 if one or more lines were found and displayed, 1 if no lines were found, and >1 if an error occurred. FILES
/usr/share/dict/words the dictionary /usr/share/dict/web2 the alternate dictionary SEE ALSO
grep(1), sort(1) COMPATIBILITY
The original manual page stated that tabs and blank characters participated in comparisons when the -d option was specified. This was incor- rect and the current man page matches the historic implementation. HISTORY
Look appeared in Version 7 AT&T Unix. BSD
June 14, 1993 BSD
Man Page

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

IP details for Unix/Linux login clients?

Hi there, I am wondering if by logging in to a unix system, if it is possible to get the IP address of the machine I am connecting FROM. I know how I can do this using the name server, but is this possible without a host lookup?:confused: Thanks, -ghoti (15 Replies)
Discussion started by: ghoti
15 Replies

2. UNIX for Advanced & Expert Users

sendmail : 550 host unknown

Hi I try to configure snedmail as smtp for my solaris box. if the useres are local there's no problem everything's working fine, but is it outside, sendmail says it could find the host. why?! all other tools find diffrent host? Could anyone tell me how I set up an easy mx ? So I test it with... (29 Replies)
Discussion started by: mrsaint
29 Replies

3. UNIX for Dummies Questions & Answers

Lookup between 2 files ( korn shell )

Hi All., i have a problem. I hope i can get some help on this issue here; i have 2 txt files say file1 and file 2 file1 has; WLMT:XXXXXXXX:cp DOLR:YYYYYYY:ascii,unblock WLG:TTTTTTT:dd:73:ascii,unblock MAR:SSSSSS:dd:152:ascii,unblock GGG:QQQQQQQQQQ:112:ascii,unblock EIE:CCCCCCCC:cp... (17 Replies)
Discussion started by: pavan_test
17 Replies

4. Shell Programming and Scripting

sed - replacing on the right of a pattern and looking for exact word?

how would you get SED to do the following, say you have the following lines in a text file: user=tigger some text some text some text some text some text some text user=ted some text some text some text some text some text some text user=thekingofrockandroll you want to find any line... (15 Replies)
Discussion started by: rich@ardz
15 Replies

5. Shell Programming and Scripting

Help require for vLookup Utility same as in EXCEL

Hi guys, can someone please help me with a vlookup utility in shell script that does the work similar to Excel. Ex: If File1.txt is 1 2 11 4 12 and File2.txt is 1 tab1 2 tab2 3 tab3 4 tab4 5 tab5 then the utility should create File3.txt with the below mentioned output: (24 Replies)
Discussion started by: viveklgupta007
24 Replies

6. Shell Programming and Scripting

Look up 2 files and print the concatenated output

file 1 Sun Mar 17 00:01:33 2013 submit , Name="1234" Sun Mar 17 00:01:33 2013 submit , Name="1344" Sun Mar 17 00:01:33 2013 submit , Name="1124" .. .. .. .. Sun Mar 17 00:01:33 2013 submit , Name="8901" file 2 Sun Mar 17 00:02:47 2013 1234 execute SUCCEEDED Sun Mar 17... (24 Replies)
Discussion started by: aravindj80
24 Replies

7. Shell Programming and Scripting

Looking for an awk command to print strings only if substring is missing

I have a file that I need to find each interface that has move-group on the interface line and print this line if the lines under the interface does Not have "filter-shared 14". Example file: interface 1/1/1/0 move-group decription one one one zero no shut filter-shared 14... (21 Replies)
Discussion started by: numele
21 Replies

8. Shell Programming and Scripting

Newbie looking for how to Grep times more than 10 seconds apart

I am new to grep and Linux and am looking to see if grep can parse out a list of lines that have a difference of more than 10 seconds between the times on each line. Example 2016-09-17 19:30:57 INFO: id: 4562079216, time: 2016-09-17 19:30:41, 2016-09-17 12:02:26 INFO: id:... (26 Replies)
Discussion started by: Markham
26 Replies

9. Shell Programming and Scripting

Vlookup using Ask from specific column from two files

File1 alias:server1_00,20:f1:0a:25:b5:03:02:90 alias:server2_00,20:f1:0a:25:b5:03:02:91 alias:server3_00,50:00:09:75:50:0d:bd:da alias:server4_00,20:f1:0a:25:b5:03:02:93 alias:server5_00,21:00:00:24:ff:8b:e1:fe alias:server6_00,50:00:09:75:50:08:54:44... (17 Replies)
Discussion started by: ranjancom2000
17 Replies

10. Shell Programming and Scripting

Script that will look the same as Cron

Hi All,. need your expertise, is there a way to create a script that will run with specific time without using cron. because i dont have access in cron. TIA (19 Replies)
Discussion started by: meister29
19 Replies