DISQUS

Tech-Recipes: Select an arbitrary column of text in UNIX | UNIX | Tech-Recipes

  • Anonymous · 3 years ago
    I don't know if you've experienced consistency problems, but I have been using cut to get pid information from ps for a long time. For example 'ps -ef | cut -c 10-15' works fine for me.
  • Anonymous · 3 years ago
    ps -ef|awk '{print $2}'

    I use it like follows...

    ps -ef|grep <filter string>|awk '{print $2}'|xargs kill -15

    Cheers.