<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: awk and special character in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/awk-and-special-character/m-p/2928427#M719949</link>
    <description>How about just:&lt;BR /&gt;&lt;BR /&gt;# ps -ef | grep "  ?  "&lt;BR /&gt;&lt;BR /&gt;NOTE:  There are supposed to be 2 spaces between (before and after) the " characters and the ? character.&lt;BR /&gt;&lt;BR /&gt;Please be careful when doing this though.  There are a LOT of processes that are started by root when the system starts that have a ? in the tty column of 'ps' output.  If you kill these you could potentially harm your system.</description>
    <pubDate>Mon, 17 Mar 2003 04:12:34 GMT</pubDate>
    <dc:creator>Patrick Wallek</dc:creator>
    <dc:date>2003-03-17T04:12:34Z</dc:date>
    <item>
      <title>awk and special character</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/awk-and-special-character/m-p/2928426#M719948</link>
      <description>&lt;P&gt;Hi,&lt;BR /&gt;How can I get the list of processes which are not associated with any terminal device by using awk?( The processes with TTY column "?" when you execute ps -ef)&lt;BR /&gt;TIA.&lt;BR /&gt;-Suki&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;P.S. this thread has been moved from HP-UX &amp;gt;&amp;nbsp;System Administration to HP-UX &amp;gt; languages - HP Forums moderator&lt;/P&gt;</description>
      <pubDate>Mon, 22 Oct 2012 05:04:19 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/awk-and-special-character/m-p/2928426#M719948</guid>
      <dc:creator>suki</dc:creator>
      <dc:date>2012-10-22T05:04:19Z</dc:date>
    </item>
    <item>
      <title>Re: awk and special character</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/awk-and-special-character/m-p/2928427#M719949</link>
      <description>How about just:&lt;BR /&gt;&lt;BR /&gt;# ps -ef | grep "  ?  "&lt;BR /&gt;&lt;BR /&gt;NOTE:  There are supposed to be 2 spaces between (before and after) the " characters and the ? character.&lt;BR /&gt;&lt;BR /&gt;Please be careful when doing this though.  There are a LOT of processes that are started by root when the system starts that have a ? in the tty column of 'ps' output.  If you kill these you could potentially harm your system.</description>
      <pubDate>Mon, 17 Mar 2003 04:12:34 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/awk-and-special-character/m-p/2928427#M719949</guid>
      <dc:creator>Patrick Wallek</dc:creator>
      <dc:date>2003-03-17T04:12:34Z</dc:date>
    </item>
    <item>
      <title>Re: awk and special character</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/awk-and-special-character/m-p/2928428#M719950</link>
      <description>Hi Patrick,&lt;BR /&gt;  It sounds good but if there is a file named "abc ? cde" and somebody is using that file I will be in trouble when I run the script.&lt;BR /&gt;  If we use awk and take the value of TTY column it will be accurate and I won't be in trouble.Can u please help me.&lt;BR /&gt;Thanks in Advance,&lt;BR /&gt;-Suki&lt;BR /&gt;</description>
      <pubDate>Mon, 17 Mar 2003 04:20:24 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/awk-and-special-character/m-p/2928428#M719950</guid>
      <dc:creator>suki</dc:creator>
      <dc:date>2003-03-17T04:20:24Z</dc:date>
    </item>
    <item>
      <title>Re: awk and special character</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/awk-and-special-character/m-p/2928429#M719951</link>
      <description>You can simplify it by using "ps -e" which makes it easier to extract. The downside is it does not show the full path of the process. For example..&lt;BR /&gt;$ ps -e|sed 's/^[ \t]*//'|grep -v \^PID|awk '{print $2, $4}'|grep \^?&lt;BR /&gt;The sed statement removes leading spaces, the first grep filters out line starting with "PID" (ie the header), the awk prints the tty and the command and the last grep only shows line starting with "?".</description>
      <pubDate>Mon, 17 Mar 2003 05:21:55 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/awk-and-special-character/m-p/2928429#M719951</guid>
      <dc:creator>S.K. Chan</dc:creator>
      <dc:date>2003-03-17T05:21:55Z</dc:date>
    </item>
    <item>
      <title>Re: awk and special character</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/awk-and-special-character/m-p/2928430#M719952</link>
      <description>hi,&lt;BR /&gt;here is a snippet. does this help. (the if loops are to check if ? appears in the sizth coulumn (if the time is in hh:mm:ss format) or in the seventh column if the time is in mmm dd format)&lt;BR /&gt;&lt;BR /&gt; ps -ef | awk '{ if ($5~/:/ &amp;amp;&amp;amp; $6~/\?/ ) print; else if ($7~/\?/ ) print }'&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;hth&lt;BR /&gt;-balaji</description>
      <pubDate>Mon, 17 Mar 2003 05:33:14 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/awk-and-special-character/m-p/2928430#M719952</guid>
      <dc:creator>Balaji N</dc:creator>
      <dc:date>2003-03-17T05:33:14Z</dc:date>
    </item>
    <item>
      <title>Re: awk and special character</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/awk-and-special-character/m-p/2928431#M719953</link>
      <description>Thanks to all who responded . Balaji has given the script what I was searching. Thanks Balaji.&lt;BR /&gt;&lt;BR /&gt;-Suki</description>
      <pubDate>Mon, 17 Mar 2003 05:59:04 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/awk-and-special-character/m-p/2928431#M719953</guid>
      <dc:creator>suki</dc:creator>
      <dc:date>2003-03-17T05:59:04Z</dc:date>
    </item>
    <item>
      <title>Re: awk and special character</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/awk-and-special-character/m-p/2928432#M719954</link>
      <description>ps(1) supports the -t option to which you give a tty as argument.  Merely supply "?".&lt;BR /&gt;&lt;BR /&gt;-dlt-</description>
      <pubDate>Tue, 18 Mar 2003 16:26:01 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/awk-and-special-character/m-p/2928432#M719954</guid>
      <dc:creator>David Totsch</dc:creator>
      <dc:date>2003-03-18T16:26:01Z</dc:date>
    </item>
  </channel>
</rss>

