<?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 doubt in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/awk-doubt/m-p/2713166#M947148</link>
    <description>Another way using cut.&lt;BR /&gt;&lt;BR /&gt;ls |grep *.sc |cut -d"." -f1&lt;BR /&gt;&lt;BR /&gt;Sachin</description>
    <pubDate>Mon, 29 Apr 2002 14:47:59 GMT</pubDate>
    <dc:creator>Sachin Patel</dc:creator>
    <dc:date>2002-04-29T14:47:59Z</dc:date>
    <item>
      <title>awk doubt</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/awk-doubt/m-p/2713162#M947144</link>
      <description>Hi All!&lt;BR /&gt; how can I get the file name without extention from the list of files?&lt;BR /&gt;ex. I have the name: 24145123.sc&lt;BR /&gt;that 24145123 is the string I need.&lt;BR /&gt;thanx.</description>
      <pubDate>Mon, 29 Apr 2002 14:39:50 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/awk-doubt/m-p/2713162#M947144</guid>
      <dc:creator>Vogra</dc:creator>
      <dc:date>2002-04-29T14:39:50Z</dc:date>
    </item>
    <item>
      <title>Re: awk doubt</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/awk-doubt/m-p/2713163#M947145</link>
      <description># echo 24145123.sc | awk -F. '{print $1}'&lt;BR /&gt;</description>
      <pubDate>Mon, 29 Apr 2002 14:44:07 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/awk-doubt/m-p/2713163#M947145</guid>
      <dc:creator>S.K. Chan</dc:creator>
      <dc:date>2002-04-29T14:44:07Z</dc:date>
    </item>
    <item>
      <title>Re: awk doubt</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/awk-doubt/m-p/2713164#M947146</link>
      <description>&lt;BR /&gt;# ls | grep ".sc" | awk -F. '{print $1}' &lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Mon, 29 Apr 2002 14:45:59 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/awk-doubt/m-p/2713164#M947146</guid>
      <dc:creator>hpuxrox</dc:creator>
      <dc:date>2002-04-29T14:45:59Z</dc:date>
    </item>
    <item>
      <title>Re: awk doubt</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/awk-doubt/m-p/2713165#M947147</link>
      <description>grep *.sc | awk -F. '{print $1}'&lt;BR /&gt;&lt;BR /&gt;Just my two cents.&lt;BR /&gt;-Sukant</description>
      <pubDate>Mon, 29 Apr 2002 14:47:17 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/awk-doubt/m-p/2713165#M947147</guid>
      <dc:creator>Sukant Naik</dc:creator>
      <dc:date>2002-04-29T14:47:17Z</dc:date>
    </item>
    <item>
      <title>Re: awk doubt</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/awk-doubt/m-p/2713166#M947148</link>
      <description>Another way using cut.&lt;BR /&gt;&lt;BR /&gt;ls |grep *.sc |cut -d"." -f1&lt;BR /&gt;&lt;BR /&gt;Sachin</description>
      <pubDate>Mon, 29 Apr 2002 14:47:59 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/awk-doubt/m-p/2713166#M947148</guid>
      <dc:creator>Sachin Patel</dc:creator>
      <dc:date>2002-04-29T14:47:59Z</dc:date>
    </item>
    <item>
      <title>Re: awk doubt</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/awk-doubt/m-p/2713167#M947149</link>
      <description>Hi Claudio&lt;BR /&gt;&lt;BR /&gt;there is a simpler way if that is waht you are trying to do&lt;BR /&gt;&lt;BR /&gt;echo 24145123.sc | cut -c 1-8 will give you the file name w/o the externsion.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Manoj Srivastava</description>
      <pubDate>Mon, 29 Apr 2002 14:49:03 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/awk-doubt/m-p/2713167#M947149</guid>
      <dc:creator>MANOJ SRIVASTAVA</dc:creator>
      <dc:date>2002-04-29T14:49:03Z</dc:date>
    </item>
    <item>
      <title>Re: awk doubt</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/awk-doubt/m-p/2713168#M947150</link>
      <description>Claudio Lima,&lt;BR /&gt;&lt;BR /&gt;Be carefull with cut -c. Cut -c  does not have the ability to do padding like awk can. I think awk is your best chose for what you are trying to do.&lt;BR /&gt;&lt;BR /&gt;-Yates&lt;BR /&gt;</description>
      <pubDate>Mon, 29 Apr 2002 14:54:01 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/awk-doubt/m-p/2713168#M947150</guid>
      <dc:creator>hpuxrox</dc:creator>
      <dc:date>2002-04-29T14:54:01Z</dc:date>
    </item>
    <item>
      <title>Re: awk doubt</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/awk-doubt/m-p/2713169#M947151</link>
      <description>If you running a shell script under "ksh", you can use the parameter substitution as follows-&lt;BR /&gt;&lt;BR /&gt;withext="12332234.sc"&lt;BR /&gt;without=${withext%.*}&lt;BR /&gt;echo $without&lt;BR /&gt;12332234&lt;BR /&gt;&lt;BR /&gt;-- Rod Hills</description>
      <pubDate>Mon, 29 Apr 2002 15:01:39 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/awk-doubt/m-p/2713169#M947151</guid>
      <dc:creator>Rodney Hills</dc:creator>
      <dc:date>2002-04-29T15:01:39Z</dc:date>
    </item>
    <item>
      <title>Re: awk doubt</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/awk-doubt/m-p/2713170#M947152</link>
      <description>Hi Claudio,&lt;BR /&gt;&lt;BR /&gt;Let's get a little weird...&lt;BR /&gt;&lt;BR /&gt;echo sc.sc.sckjs.scsc.scs.sc | awk '{FS="\.sc$"} {print $1}'&lt;BR /&gt;&lt;BR /&gt;This allows for multiple "dots" in the filename as well as multiple occurances or ".sc".  Not to mention that the "$" anchors &lt;BR /&gt;".sc" to the end of the filename and the "\" keeps the "." from being expanded as a wildcard.&lt;BR /&gt;&lt;BR /&gt;Rodney's tip works well!  It's much simpler than this.&lt;BR /&gt;&lt;BR /&gt;Darrell</description>
      <pubDate>Mon, 29 Apr 2002 15:08:21 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/awk-doubt/m-p/2713170#M947152</guid>
      <dc:creator>Darrell Allen</dc:creator>
      <dc:date>2002-04-29T15:08:21Z</dc:date>
    </item>
    <item>
      <title>Re: awk doubt</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/awk-doubt/m-p/2713171#M947153</link>
      <description>Hi&lt;BR /&gt;&lt;BR /&gt;and an alternative to awk&lt;BR /&gt;&lt;BR /&gt;echo 24145123.sc  | sed -e 's/.sc//g'&lt;BR /&gt;&lt;BR /&gt;cheers&lt;BR /&gt;John&lt;BR /&gt;</description>
      <pubDate>Mon, 29 Apr 2002 15:28:46 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/awk-doubt/m-p/2713171#M947153</guid>
      <dc:creator>John Carr_2</dc:creator>
      <dc:date>2002-04-29T15:28:46Z</dc:date>
    </item>
    <item>
      <title>Re: awk doubt</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/awk-doubt/m-p/2713172#M947154</link>
      <description>Hi:&lt;BR /&gt;&lt;BR /&gt;I can't resist...Rodney's solution is the fastest, since the shell is doing the work rather than spawning another process.&lt;BR /&gt;&lt;BR /&gt;Another 'awk' variation, which would be useful if you had multiple fields (columns) each with "."s might look like this:&lt;BR /&gt;&lt;BR /&gt;# echo "abc.123 def.456 ghi.789"|awk '{split($3,a,".");print a[1]}'&lt;BR /&gt;&lt;BR /&gt;In the above example, "ghi" (the first part of the third field) would be returned.&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
      <pubDate>Mon, 29 Apr 2002 15:39:08 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/awk-doubt/m-p/2713172#M947154</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2002-04-29T15:39:08Z</dc:date>
    </item>
    <item>
      <title>Re: awk doubt</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/awk-doubt/m-p/2713173#M947155</link>
      <description>You don't need awk.&lt;BR /&gt;There is a command exactly for this:&lt;BR /&gt; basename 24145123.sc .sc&lt;BR /&gt;(only works if you know the extension, ie '.sc' though)&lt;BR /&gt;&lt;BR /&gt;Graham</description>
      <pubDate>Tue, 30 Apr 2002 08:53:11 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/awk-doubt/m-p/2713173#M947155</guid>
      <dc:creator>Graham Cameron_1</dc:creator>
      <dc:date>2002-04-30T08:53:11Z</dc:date>
    </item>
    <item>
      <title>Re: awk doubt</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/awk-doubt/m-p/2713174#M947156</link>
      <description>Good one Graham!  I had thought about basename but obviously didn't read the man page very closely.  Duh!  Learned something again!&lt;BR /&gt;&lt;BR /&gt;This points out how often there are other uses for UNIX commands other than the one(s) we typically use.  Also the value of these forums.&lt;BR /&gt;&lt;BR /&gt;N/A please.&lt;BR /&gt;&lt;BR /&gt;Darrell</description>
      <pubDate>Tue, 30 Apr 2002 12:03:47 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/awk-doubt/m-p/2713174#M947156</guid>
      <dc:creator>Darrell Allen</dc:creator>
      <dc:date>2002-04-30T12:03:47Z</dc:date>
    </item>
    <item>
      <title>Re: awk doubt</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/awk-doubt/m-p/2713175#M947157</link>
      <description>I like sed:&lt;BR /&gt;&lt;BR /&gt;echo "this.that" | sed 's/\..*//'</description>
      <pubDate>Tue, 30 Apr 2002 18:09:07 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/awk-doubt/m-p/2713175#M947157</guid>
      <dc:creator>Charles Stepp</dc:creator>
      <dc:date>2002-04-30T18:09:07Z</dc:date>
    </item>
  </channel>
</rss>

