Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

bash question (possibly newbie'ish)

  • 08-11-2001 4:36pm
    #1
    Registered Users, Registered Users 2 Posts: 21,264 ✭✭✭✭


    Ok I want to kill all wine processes in one go in a bash file.

    So something like ps -A | grep wine will list all the processes that need to be killed. The first column is the process ID's (would be $1 if command line).

    What's the syntax to actually kill all the processes? :( Been a while since I did this sort of thing. =/

    ps. I know kill -9 will kill the process, I'm looking for the bash syntax to drag the id's out.


Comments

  • Registered Users, Registered Users 2 Posts: 1,982 ✭✭✭ObeyGiant


    for i in `ps -A | grep wine | awk {'print $1'}`
    do
      kill -9 $i
    done
    

    Or 'killall wine'


  • Registered Users, Registered Users 2 Posts: 21,264 ✭✭✭✭Hobbes


    Cheers!


Advertisement