WOT: Scripting Question[Scanned]
Alexander Dalloz
ad+lists at uni-x.org
Thu Jul 27 19:03:43 UTC 2006
Chris Bradford schrieb:
> Alexander Dalloz wrote:
>>> The file is generated every hour by the command:
>>>
>>> qwinsta /SERVER:servername | find "Disc" > disc.txt
>>
>>
>> I wouldn't have expected "find" in this command. Wouldn't that be "grep"?
>
You didn't say whether it is really "find" what you are using. I take it
you want to identify matches for "Disc" in the output of "qwinsta". So
"find" isn't the "find" command.
> > Alexander,
>
> Firstly thanks for your reply,
>
> I do not need to have the disc.txt file, how would I remove this step?
>
> I thought this was necessary..
>
> Many thanks,
>
> -Chris
for i in $(qwinsta /SERVER:servername | awk '/Disc/ {print $3}')
do rwinsta /SERVER:servername ${i}
done
Alexander
More information about the fedora-list
mailing list