corey01: (Default)
[personal profile] corey01
публикую скриптик (работает в Linux или cygwin) для вычисления жж-ных друзей в dw.

Как пользоваться:

1. Скопировать скрипт в файл (напр. lj2dw.sh)
2. В той же папке завести файлик (напр. users.txt) и копи-паст в него список друзей из жж-профайла.
3. Не забываем chmod +x lj2dw.sh
4. ./lj2dw.sh users.txt
5. voila


#!/bin/bash
if [ -z $1 ]; then
echo "usage: testusers "
echo " users list: text file with dw nicknames, space, tab, or newline delimited"
exit
fi
rm users-found.txt
us=`cat $1`
us=${us//","/" "}
us=( $us )
for ((j=0;j<${#us[*]};j++));do
if grep -q "There is no user" <<< `curl ${us[j]}.dreamwidth.org`; then
echo "No user ${us[j]} found"
else
echo "FOUND USER ${us[j]}!!!!!!"
echo ${us[j]}>>users-found.txt
fi
done
echo "*************"
echo "Found users:"
cat users-found.txt
From:
Anonymous (will be screened)
OpenID (will be screened if not validated)
Identity URL: 
User
Account name:
Password:
If you don't have an account you can create one now.
Subject:
HTML doesn't work in the subject.

Message:

If you are unable to use this captcha for any reason, please contact us by email at support@dreamwidth.org


 
Notice: This account is set to log the IP addresses of everyone who comments.
Links will be displayed as unclickable URLs to help prevent spam.

Profile

corey01: (Default)
corey01

December 2012

S M T W T F S
      1
2345678
9101112131415
1617 1819202122
23242526272829
3031     

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated Sep. 26th, 2017 10:01 pm
Powered by Dreamwidth Studios