Skip to content
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
42 lines (33 sloc) 1.28 KB
#!/usr/bin/env fish
# this file expects to be ran on labnet itself!
# it'll output the file you see in this dir,, auto-magically :star:
function print_list_of_homepages
set old_dir (pwd)
cd $argv[1]
for f in */
set name (string replace "/" "" $f)
set homepage "$name/"
if curl --output /dev/null --silent --head --fail $homepage
set common_name (string replace "cn: " "" (ldapsearch -ZZ -LLL "(uid=$name)" | grep "cn: "))
printf '* %s - [%s](%s)\n' $common_name $name $homepage
end | sort -k3
cd $old_dir
function faculty_page
echo "title: Faculty"
echo "---"
echo "body:"
echo ""
echo "# Faculty"
echo ""
echo "Below is a _noncomprehensive_ list of homepages for various computer science faculty members, potentially outdated/dead links."
echo ""
echo "Note: some users in this list might be duplicated / not really 'people', it's simply based on all users within the faculty directory using [this]( script."
echo ""
print_list_of_homepages "/users/cs/faculty"
print_list_of_homepages "/users/cs/staff"
print_list_of_homepages "/users/cs/staff2"
faculty_page >
You can’t perform that action at this time.