<?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 help in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/awk-help/m-p/3265508#M888709</link>
    <description>rty to pipe via tr:&lt;BR /&gt;&lt;BR /&gt; |tr -d \'</description>
    <pubDate>Mon, 03 May 2004 05:15:18 GMT</pubDate>
    <dc:creator>Leif Halvarsson_2</dc:creator>
    <dc:date>2004-05-03T05:15:18Z</dc:date>
    <item>
      <title>awk help</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/awk-help/m-p/3265507#M888708</link>
      <description>Hi,&lt;BR /&gt;Can anyone help me to modify my script? I just want to get rid of single quote from Name columns. How can i use sed,tr from within printf statement? Or else there may be other way.&lt;BR /&gt;Below is my script.&lt;BR /&gt;&lt;BR /&gt;#!/bin/sh                     &lt;BR /&gt;DIR="/home/tapas/"            &lt;BR /&gt;DT=`date +%d`                 &lt;BR /&gt;DT=`expr $DT - 1`             &lt;BR /&gt;DTCT=`echo $DT|wc -m`         &lt;BR /&gt;FL="logfile.20040429"         &lt;BR /&gt;ll $DIR/$FL &amp;gt; /dev/null       &lt;BR /&gt;RFL="report`date +%Y%m$DT`.xls"                                       &lt;BR /&gt;echo "TIME\t\tNAME\t\tFROM\t\tVIA"&amp;gt;$RFL                               &lt;BR /&gt;grep -e "- OK --" $FL|awk '                                           &lt;BR /&gt;{                                                                     &lt;BR /&gt;        if ( $9 == "via" )                                            &lt;BR /&gt;        {                                                             &lt;BR /&gt;           printf $4"\t"$8"\t"$12"\t"$10"\n"                    &lt;BR /&gt;        }                                                             &lt;BR /&gt;        else                                                          &lt;BR /&gt;        {                                                             &lt;BR /&gt;           printf $4"\t"$8"\t"$10"\n"                           &lt;BR /&gt;        }                                                             &lt;BR /&gt;}                                                                     &lt;BR /&gt;'&amp;gt;&amp;gt;$RFL                                                               &lt;BR /&gt;&lt;BR /&gt;Below is the logfile.&lt;BR /&gt;Thu Apr 29 07:43:16 2004: created by PID 5173 Version 5.1.1A AAA_POLL BINARY_AATV CHK_COUNTS CHK_SHELLS CHK_TOKEN EMAIL LAS =  1.7.1  (NO-HGAS) Y2K up since Sun Apr 25 07:59:11 2004                                         &lt;BR /&gt;Thu Apr 29 07:43:16 2004: fsmid check+las-logall-1.0; hostname bombay; dns-name bombay.abc.com                                                        &lt;BR /&gt;Thu Apr 29 07:43:16 2004: Switched from '/var/opt/aaa/logs/logfile.20040428' to &lt;BR /&gt;'/var/opt/aaa/logs/logfile.20040429'                                            &lt;BR /&gt;Thu Apr 29 07:43:16 2004: Received-Authentication: 2/294 'tapas' via a.b.c.d&lt;BR /&gt;from d.e.f.g port 133 PPP                                             &lt;BR /&gt;Thu Apr 29 07:43:16 2004: find_auth_ent: no default authfile data structure     &lt;BR /&gt;Thu Apr 29 07:43:16 2004: Authentication: 2/294 'tapas' via a.b.c.d from&lt;BR /&gt; d.e.f.g port 133 PPP - OK -- total 0, holding 0                           &lt;BR /&gt;Thu Apr 29 07:43:16 2004: created by PID 5173 Version 5.1.1A AAA_POLL BINARY_AATV CHK_COUNTS CHK_SHELLS CHK_TOKEN EMAIL LAS =  1.7.1  (NO-HGAS) Y2K up since Sun Apr 25 07:59:11 2004                                         &lt;BR /&gt;Thu Apr 29 07:43:16 2004: fsmid check+las-logall-1.0; hostname bombay; dns-name bombay.abc.com                                                        &lt;BR /&gt;&lt;BR /&gt;Output is like below. But  instead of 'tapas'  i want  tapas( Not any quatation)&lt;BR /&gt;TIME            NAME            FROM            VIA          &lt;BR /&gt;07:43:16        'tapas'           d.e.f.g           a.b.c.d&lt;BR /&gt;</description>
      <pubDate>Mon, 03 May 2004 04:59:03 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/awk-help/m-p/3265507#M888708</guid>
      <dc:creator>Tapas Jha</dc:creator>
      <dc:date>2004-05-03T04:59:03Z</dc:date>
    </item>
    <item>
      <title>Re: awk help</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/awk-help/m-p/3265508#M888709</link>
      <description>rty to pipe via tr:&lt;BR /&gt;&lt;BR /&gt; |tr -d \'</description>
      <pubDate>Mon, 03 May 2004 05:15:18 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/awk-help/m-p/3265508#M888709</guid>
      <dc:creator>Leif Halvarsson_2</dc:creator>
      <dc:date>2004-05-03T05:15:18Z</dc:date>
    </item>
    <item>
      <title>Re: awk help</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/awk-help/m-p/3265509#M888710</link>
      <description>you can add one line like&lt;BR /&gt;&lt;BR /&gt;regsub("'","",$8) &lt;BR /&gt;&lt;BR /&gt;in your awk script.&lt;BR /&gt;&lt;BR /&gt;regsub makes a substitution in your script.&lt;BR /&gt;check manual 'cause awk changes between various unix flavours.&lt;BR /&gt;&lt;BR /&gt;Peace, R.</description>
      <pubDate>Mon, 03 May 2004 05:33:40 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/awk-help/m-p/3265509#M888710</guid>
      <dc:creator>Roberto Polli</dc:creator>
      <dc:date>2004-05-03T05:33:40Z</dc:date>
    </item>
    <item>
      <title>Re: awk help</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/awk-help/m-p/3265510#M888711</link>
      <description>Hi,&lt;BR /&gt;Can u tell me where exactly  insert tr or regsub/gsub in my script? I understand this is a simple thing but i am not able to solve right now.&lt;BR /&gt;&lt;BR /&gt;Rgds&lt;BR /&gt;Tapas</description>
      <pubDate>Mon, 03 May 2004 06:33:40 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/awk-help/m-p/3265510#M888711</guid>
      <dc:creator>Tapas Jha</dc:creator>
      <dc:date>2004-05-03T06:33:40Z</dc:date>
    </item>
    <item>
      <title>Re: awk help</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/awk-help/m-p/3265511#M888712</link>
      <description>Hi, &lt;BR /&gt;you can put a substr command in the printf statement:&lt;BR /&gt;&lt;BR /&gt;printf $4"\t"substr($8,2,length($8)-2)"\t"$12"\t"$10"\n" &lt;BR /&gt;&lt;BR /&gt;this prints the 8th field without the first and last characters.&lt;BR /&gt;&lt;BR /&gt;Frank.</description>
      <pubDate>Mon, 03 May 2004 06:55:54 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/awk-help/m-p/3265511#M888712</guid>
      <dc:creator>Francisco J. Soler</dc:creator>
      <dc:date>2004-05-03T06:55:54Z</dc:date>
    </item>
    <item>
      <title>Re: awk help</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/awk-help/m-p/3265512#M888713</link>
      <description>Thanx Solar.&lt;BR /&gt;I was not able to solve this simple problem. Actually in one of my earlier script&lt;BR /&gt;i had solution similar to yours. Thanx a lot.&lt;BR /&gt;&lt;BR /&gt;Rgds&lt;BR /&gt;Tapas</description>
      <pubDate>Mon, 03 May 2004 07:07:00 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/awk-help/m-p/3265512#M888713</guid>
      <dc:creator>Tapas Jha</dc:creator>
      <dc:date>2004-05-03T07:07:00Z</dc:date>
    </item>
  </channel>
</rss>

