LOOK(1)
π LOOK(1) β find lines in a sorted list π
okay bestie, so this is look, and it lives in the User Contributed Perl Documentation section of the manual pages (section 1, iykyk). it's a tiny little icon and it's here to help you find your lines. let's go β¨
πΈ SYNOPSIS πΈ
look [-df] string [file]
that's it. that's the whole vibe. one string, maybe a file, maybe a flag or two. no cap π«Ά
π DESCRIPTION π
so here's the tea: look does a binary search against a sorted file, and prints out, like, all the lines that begin with the string you gave it. every single one. it's giving "find your people" energy fr fr π₯
and yes, it does make use of Perl's use locale pragma. very demure, very mindful of your locale settings π
the -d and -f options affect comparisons as in sort(1):
-dβDictionaryorder, bestie: only non-alphanumerics and underscores participate in comparisons. that's it. that's the whole cast. the letters are literally not invited π-fβ Fold. upper case letters compare equal to lower case. soAandaare the same person, they're twins, we don't separate them π
if no file is specified,/usr/dict/wordsis assumed (or/usr/share/dict/wordsif the former is missing), with a collating sequence of-df. so it just goes and picks a dictionary for you like a good little main character π
π FILES π
/usr/dict/words/usr/share/dict/words
these are the word-hoards. the sacred texts. protect them π§
π¦ SEE ALSO π¦
go read these too, they're all part of the friend group π
β BUGS β
look has no known bugs. not one. she's flawless. she's that girl. periodt πβ¨
π AUTHOR π
the Perl implementation of look was written by Tom Christiansen, tchrist@perl.com. give him his flowers, he earned them πΈ
π COPYRIGHT and LICENSE π
This program is copyright (c) Tom Christiansen 1999.
This program is free and open software. You may use, modify, distribute, and sell this program (and any modified variants) in any way you wish, provided you do not restrict others from doing the same. literally the nicest license ever, we love a generous king π«Ά
and that's the page, bestie!! this whole thing isperl v5.42.2, dated2026-02-15, straight from theLOOK(1)manual. mwah π go find your lines. slay. ππ¦π
π¦ where this page comes from
- alpine 3.24: perl-power-tools-doc 1.053-r1 Β· GPL-2.0-or-later AND Artistic-1.0-Perl AND Artistic-2.0 AND BSD-2-Clause
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms