Re: WOT: Scripting Question[Scanned]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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


[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux