Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #! /bin/bash
- hostname="epheo_laptop"
- if [ -f result.txt ]
- then
- rm result.txt
- fi
- ldapsearch -x supinfo01 -LLL -h winamin.tld -b"cn='$hostname',ou=computers,DC=winamin,DC=tld" serialNumber | grep serialNumber | sed 's/serialNumber: //' > ._tmp1
- echo '######################################'
- cat ._tmp1
- uri()
- {
- ldapsearch -x supinfo01 -LLL -h winamin.tld -b"policy='$1',ou=gpo,DC=winamin,DC=tld" uri | grep uri | sed 's/uri: //' >> result.txt
- }
- while read line
- do
- uri "$ line"
- done <._tmp1
Add Comment
Please, Sign In to add comment