Search Results

Search: Posts Made By: jmorey
1,425
Posted By Scrutinizer
Hi, like this, I'd say: newuidnr=$( ldapsearch...
Hi, like this, I'd say:
newuidnr=$( ldapsearch -x -b 'dc=beasty,dc=netlab,dc=albury,dc=tafe' '(objectclass=posixAccount)' uidnumber | awk '/uidNumber/&&$2>t{t=$2}END{print t+1}')
you can leave out...
2,307
Posted By Scrutinizer
Or all in one go: var=$(ldapsearch -x...
Or all in one go:
var=$(ldapsearch -x '(dn:=dc)' dc | awk -F'[=.,<>]' '/dc=/{print $3"."$5"."$7"."$9}')
2,307
Posted By anurag.singh
var=$(echo "dc=james,dc=morey,dc=home,dc=com" |...
var=$(echo "dc=james,dc=morey,dc=home,dc=com" | sed 's/dc=//g' | sed 's/,/./g')OR
var=$(ldapsearch -x '(dn:=dc)' dc|grep dc= | awk -F'[<>]' '{print $2}' | sed 's/dc=//g' | sed 's/,/./g')
2,307
Posted By Scrutinizer
Try: var=$(ldapsearch -x '(dn:=dc)' dc|grep dc=...
Try:
var=$(ldapsearch -x '(dn:=dc)' dc|grep dc= | awk -F'[<>]' '{print $2}')
or
var=$(ldapsearch -x '(dn:=dc)' dc | awk -F'[<>]' '/dc=/{print $2}')
2,307
Posted By Scrutinizer
You can use var=$(...) to put the output of a...
You can use var=$(...) to put the output of a (series of) command(s) into a variable.
Showing results 1 to 5 of 5

 
All times are GMT -4. The time now is 08:28 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy