[root@linux root]# ldapsearch uid=userabc | grep homedirectory | awk .F=
'{print $2;}'
/home/userabc <----- this output is displayed on the screen by "awk"
how can i pipe the result "/home/userabc" to "rm -f -r" to remove all files
and directories in /home/userabc? the question is really how to pipe an
output from some program (like grep or awk) to be the input of "rm" command.
thanks.
----- Original Message -----
From: Vineeta <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, November 21, 2000 2:13 PM
Subject: Re: shell script
>
> What is the output of /home/userabc like?
> Does it contain sub-directories which u want to be removed?
> give me a sample and i'll help you out.
>
> Cheers,
> Vineeta
>
>
> Corisen wrote:
>
> > i'm writing a simple shell script to automate removal of directories.
> >
> > i've managed to extract the user home directory from LDAP server using
> > "ldapsearch uid=userabc homedirectory | grep homedirectory | awk -F=
'{print
> > $2;}'".
> >
> > the above command result is "/home/userabc"
> >
> > pls advise how i can pass the result of "/home/userabe" to "rm -f -r" to
> > delete the directory?
> >
> > thanks.
> >
> > _______________________________________________
> > Redhat-list mailing list
> > [EMAIL PROTECTED]
> > https://listman.redhat.com/mailman/listinfo/redhat-list
>
>
>
> _______________________________________________
> Redhat-list mailing list
> [EMAIL PROTECTED]
> https://listman.redhat.com/mailman/listinfo/redhat-list
_______________________________________________
Redhat-list mailing list
[EMAIL PROTECTED]
https://listman.redhat.com/mailman/listinfo/redhat-list