LOOK(1)

πŸ“¦ version 1.053, in alpine 3.24

πŸ’… 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 β€” Dictionary order, 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. so A and a are the same person, they're twins, we don't separate them πŸ‘‘
if no file is specified, /usr/dict/words is assumed (or /usr/share/dict/words if 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 🌸


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 is perl v5.42.2, dated 2026-02-15, straight from the LOOK(1) manual. mwah πŸ’‹ go find your lines. slay. πŸŽ€πŸ¦‹πŸ’–
πŸ“¦ where this page comes from