<?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 cut in a script in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/cut-in-a-script/m-p/2776023#M76018</link>
    <description>Hello &lt;BR /&gt;I am trying to write a script that gives me a swlist, and other&lt;BR /&gt;things, I am trying to cut out&lt;BR /&gt;some "tabs" How do I cut out tabs&lt;BR /&gt;using the cut command???</description>
    <pubDate>Tue, 30 Jul 2002 21:23:20 GMT</pubDate>
    <dc:creator>ROSS HANSON</dc:creator>
    <dc:date>2002-07-30T21:23:20Z</dc:date>
    <item>
      <title>cut in a script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/cut-in-a-script/m-p/2776023#M76018</link>
      <description>Hello &lt;BR /&gt;I am trying to write a script that gives me a swlist, and other&lt;BR /&gt;things, I am trying to cut out&lt;BR /&gt;some "tabs" How do I cut out tabs&lt;BR /&gt;using the cut command???</description>
      <pubDate>Tue, 30 Jul 2002 21:23:20 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/cut-in-a-script/m-p/2776023#M76018</guid>
      <dc:creator>ROSS HANSON</dc:creator>
      <dc:date>2002-07-30T21:23:20Z</dc:date>
    </item>
    <item>
      <title>Re: cut in a script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/cut-in-a-script/m-p/2776024#M76019</link>
      <description>If you use the following "awk" command-&lt;BR /&gt;&lt;BR /&gt;swlist | awk '/^  /{print $1 ":" $2 ":" $3}'&lt;BR /&gt;&lt;BR /&gt;This will replace the tabs with ":".&lt;BR /&gt;&lt;BR /&gt;Hope this helps.&lt;BR /&gt;&lt;BR /&gt;-- Rod Hills</description>
      <pubDate>Tue, 30 Jul 2002 21:30:35 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/cut-in-a-script/m-p/2776024#M76019</guid>
      <dc:creator>Rodney Hills</dc:creator>
      <dc:date>2002-07-30T21:30:35Z</dc:date>
    </item>
    <item>
      <title>Re: cut in a script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/cut-in-a-script/m-p/2776025#M76020</link>
      <description>try this:&lt;BR /&gt;&lt;BR /&gt;swlist | cut -d"Ctrl-vCtrli" -f2&lt;BR /&gt;&lt;BR /&gt;Ctrl-v and Ctrl-i should put a tab in "cut" as a seperator.&lt;BR /&gt;&lt;BR /&gt;live free or die&lt;BR /&gt;harry</description>
      <pubDate>Tue, 30 Jul 2002 22:12:25 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/cut-in-a-script/m-p/2776025#M76020</guid>
      <dc:creator>harry d brown jr</dc:creator>
      <dc:date>2002-07-30T22:12:25Z</dc:date>
    </item>
    <item>
      <title>Re: cut in a script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/cut-in-a-script/m-p/2776026#M76021</link>
      <description>Hi,&lt;BR /&gt;I just tried:&lt;BR /&gt;swlist|cut -f1&lt;BR /&gt;this gave me just col. 1.  &lt;BR /&gt;Looked in 'cut' man pages - tab delimiter is the default, so i figure no need to actually specify it, when used with -f.&lt;BR /&gt;&lt;BR /&gt;see ya.&lt;BR /&gt;Maria</description>
      <pubDate>Tue, 30 Jul 2002 23:18:27 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/cut-in-a-script/m-p/2776026#M76021</guid>
      <dc:creator>Peter Gillis</dc:creator>
      <dc:date>2002-07-30T23:18:27Z</dc:date>
    </item>
    <item>
      <title>Re: cut in a script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/cut-in-a-script/m-p/2776027#M76022</link>
      <description>I often find its usefull to translate the tabs into spaces and then remove repeated spaces using this command string - &lt;BR /&gt;&lt;BR /&gt;tr '\011' ' ' | tr -s " "&lt;BR /&gt;&lt;BR /&gt;Or you could simply change successive tabs into one tab with tr -s "\011"&lt;BR /&gt;</description>
      <pubDate>Wed, 31 Jul 2002 07:59:39 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/cut-in-a-script/m-p/2776027#M76022</guid>
      <dc:creator>Nick Wickens</dc:creator>
      <dc:date>2002-07-31T07:59:39Z</dc:date>
    </item>
    <item>
      <title>Re: cut in a script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/cut-in-a-script/m-p/2776028#M76023</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;Sometimes its difficult using awk to differentiate between the colums beacuse of the difference in the amounts of tabs, spaces etc. You can use the folowing:&lt;BR /&gt;&lt;BR /&gt;swlist -l product -a size -a install_date -a description | while read SIZE DATE DESC &lt;BR /&gt;do&lt;BR /&gt;...&lt;BR /&gt;done&lt;BR /&gt;&lt;BR /&gt;This way you can seperate the different columns, just have description as the last column.&lt;BR /&gt;&lt;BR /&gt;HtH,&lt;BR /&gt;Mark</description>
      <pubDate>Wed, 31 Jul 2002 08:13:18 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/cut-in-a-script/m-p/2776028#M76023</guid>
      <dc:creator>Mark van Hassel</dc:creator>
      <dc:date>2002-07-31T08:13:18Z</dc:date>
    </item>
    <item>
      <title>Re: cut in a script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/cut-in-a-script/m-p/2776029#M76024</link>
      <description>Expanding tabs to spaces *keeping* the format (column-wise) can be done with the command 'expand'&lt;BR /&gt;&lt;BR /&gt;cut -f1 works on tabs, so - as Maria already said - should just give what you need.&lt;BR /&gt;&lt;BR /&gt;If you have `expand'ed your tabs, you can switch to&lt;BR /&gt;&lt;BR /&gt;cut -c1-9 to get the first nine characters of each line (or -c16-55 for columns 16 though 55, see man cut), including the white space&lt;BR /&gt;&lt;BR /&gt;cut also accepts a -d option to specify the delimiter&lt;BR /&gt;&lt;BR /&gt;cut -d\&lt;TAB&gt; -f3 ...&lt;/TAB&gt;</description>
      <pubDate>Wed, 31 Jul 2002 08:22:01 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/cut-in-a-script/m-p/2776029#M76024</guid>
      <dc:creator>H.Merijn Brand (procura</dc:creator>
      <dc:date>2002-07-31T08:22:01Z</dc:date>
    </item>
  </channel>
</rss>

