Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon.

Pages: 1-

az

Name: Anonymous 2012-12-11 2:16

#!/bin/sh
for l in {a..z}; do
  for r in {a..z}; do
    name=$l$r
    if command which -s $name; then
      echo $name
    else
      # TODO -- Look the program up in the package manager
    fi
  done
done


I like to go around trying out all the two-letter commands on the systems I use. Or at least reading their man pages to see if they do anything fun.

Name: Anonymous 2012-12-11 4:21

Why are you running them in order to find whether they exist?
What if someone wrote a script called nh that nuked your home folder, for instance?

Name: Anonymous 2012-12-11 4:27

echo {0..1}{0..1}{0..1}{0..1}{0..1}{0..1}{0..1}{0..1}

Name: Anonymous 2012-12-11 4:43

>>2
command which -s $name
That doesn't run them.

Name: Anonymous 2012-12-11 4:48

>>4
Whoops, I put backticks around it in my head. Never mind.

Don't change these.
Name: Email:
Entire Thread Thread List