<?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 same function with awk in unix in Operating System - OpenVMS</title>
    <link>https://community.hpe.com/t5/operating-system-openvms/same-function-with-awk-in-unix/m-p/4753036#M101237</link>
    <description>Hi&lt;BR /&gt;&lt;BR /&gt;What is same function of openvms with awk of unix?&lt;BR /&gt;&lt;BR /&gt;In example;&lt;BR /&gt;&lt;BR /&gt;#ls -l | awk '{print $1}'&lt;BR /&gt;&lt;BR /&gt;How to use above function in openvms?&lt;BR /&gt;&lt;BR /&gt;Regards</description>
    <pubDate>Tue, 15 Feb 2011 08:30:18 GMT</pubDate>
    <dc:creator>vpar</dc:creator>
    <dc:date>2011-02-15T08:30:18Z</dc:date>
    <item>
      <title>same function with awk in unix</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/same-function-with-awk-in-unix/m-p/4753036#M101237</link>
      <description>Hi&lt;BR /&gt;&lt;BR /&gt;What is same function of openvms with awk of unix?&lt;BR /&gt;&lt;BR /&gt;In example;&lt;BR /&gt;&lt;BR /&gt;#ls -l | awk '{print $1}'&lt;BR /&gt;&lt;BR /&gt;How to use above function in openvms?&lt;BR /&gt;&lt;BR /&gt;Regards</description>
      <pubDate>Tue, 15 Feb 2011 08:30:18 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/same-function-with-awk-in-unix/m-p/4753036#M101237</guid>
      <dc:creator>vpar</dc:creator>
      <dc:date>2011-02-15T08:30:18Z</dc:date>
    </item>
    <item>
      <title>Re: same function with awk in unix</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/same-function-with-awk-in-unix/m-p/4753037#M101238</link>
      <description>&lt;P&gt;Vpar,&lt;BR /&gt;&lt;BR /&gt;welcome to the ITRC OpenVMS forum!&lt;BR /&gt;&lt;BR /&gt;There is no direct equivalent of awk in OpenVMS, but depending upon your environment, you may be able to use other tools.&lt;BR /&gt;&lt;BR /&gt;Try searching the OpenVMS forum for "awk".&lt;BR /&gt;&lt;BR /&gt;useful results include:&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://h30499.www3.hp.com/t5/Languages-and-Scripting/KSH-to-DCL-command-question-easy/m-p/3742697#M2091" target="_blank"&gt;http://h30499.www3.hp.com/t5/Languages-and-Scripting/KSH-to-DCL-command-question-easy/m-p/3742697#M2091&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;&lt;A href="http://h30499.www3.hp.com/t5/Languages-and-Scripting/DCL-Search/m-p/3755839#M2204" target="_blank"&gt;http://h30499.www3.hp.com/t5/Languages-and-Scripting/DCL-Search/m-p/3755839#M2204&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;&lt;A href="http://h30499.www3.hp.com/t5/System-Management/awk-external-command-and-quotes/m-p/4008088#M17182" target="_blank"&gt;http://h30499.www3.hp.com/t5/System-Management/awk-external-command-and-quotes/m-p/4008088#M17182&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;Here is a trivial sample command procedure showing how the DCL lexical function f$element could achieve a solution to your simple enquiry.&lt;BR /&gt;&lt;BR /&gt;$ set nover&lt;BR /&gt;$ bash&lt;BR /&gt;ls -l &amp;gt;&amp;gt; fred.tmp&lt;BR /&gt;exit&lt;BR /&gt;$ open/read inp_fil fred.tmp&lt;BR /&gt;$ write sys$output "---- VMS style ----"&lt;BR /&gt;$loop1:&lt;BR /&gt;$ read/end=end_loop1 inp_fil inp_rec&lt;BR /&gt;$ write sys$output f$element(0," ",inp_rec)&lt;BR /&gt;$ goto loop1&lt;BR /&gt;$end_loop1:&lt;BR /&gt;$ close inp_fil&lt;BR /&gt;$ del/noconf/nolog fred.tmp.*&lt;BR /&gt;$!&lt;BR /&gt;$! or&lt;BR /&gt;$!&lt;BR /&gt;$unix_style:&lt;BR /&gt;$ write sys$output "---- Unix style ----"&lt;BR /&gt;$ bash&lt;BR /&gt;ls -l | awk '{print $1}'&lt;BR /&gt;exit&lt;BR /&gt;$ del/noconf/nolog fred.tmp.*&lt;BR /&gt;$exit&lt;BR /&gt;&lt;BR /&gt;Of course, if you have GNV installed then you could simply write your own scripts using gawk.&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;&lt;BR /&gt;Duncan&lt;/P&gt;</description>
      <pubDate>Mon, 19 Sep 2011 17:02:19 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/same-function-with-awk-in-unix/m-p/4753037#M101238</guid>
      <dc:creator>Duncan Morris</dc:creator>
      <dc:date>2011-09-19T17:02:19Z</dc:date>
    </item>
    <item>
      <title>Re: same function with awk in unix</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/same-function-with-awk-in-unix/m-p/4753038#M101239</link>
      <description>&lt;!--!*#--&gt;&amp;gt; How to use above function in openvms?&lt;BR /&gt;&lt;BR /&gt;The best answer is probably that one would&lt;BR /&gt;not normally do anything like that in VMS&lt;BR /&gt;(DCL).  If you're looking for file&lt;BR /&gt;permissions (called "protections" here), then&lt;BR /&gt;there are other, better ways to get them.&lt;BR /&gt;For example:&lt;BR /&gt;&lt;BR /&gt;ALP $ write sys$output f$file_attributes( "login.com", "PRO")&lt;BR /&gt;SYSTEM=RWED, OWNER=RWED, GROUP=RE, WORLD=RE&lt;BR /&gt;&lt;BR /&gt;Note that this is done entirely in DCL,&lt;BR /&gt;without running a program like "ls" or "awk".&lt;BR /&gt;VMS is not a UNIX(-like) operating system,&lt;BR /&gt;so the best way to do something in VMS is&lt;BR /&gt;often not the UNIX way.&lt;BR /&gt;&lt;BR /&gt;Is there some actual problem which you are&lt;BR /&gt;trying to solve?  As usual, it can be more&lt;BR /&gt;helpful to ask how to get a particular result&lt;BR /&gt;than it is to ask how to implement some&lt;BR /&gt;particular (sub-optimal) "solution".</description>
      <pubDate>Tue, 15 Feb 2011 14:17:39 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/same-function-with-awk-in-unix/m-p/4753038#M101239</guid>
      <dc:creator>Steven Schweda</dc:creator>
      <dc:date>2011-02-15T14:17:39Z</dc:date>
    </item>
    <item>
      <title>Re: same function with awk in unix</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/same-function-with-awk-in-unix/m-p/4753039#M101240</link>
      <description>I'm with Steve here. &lt;BR /&gt;What is the read problem you are trying to solve here?&lt;BR /&gt;A) get awk to go? install gawk and be happy&lt;BR /&gt;B) get LS -L to go? switch into a gnv/bash environment&lt;BR /&gt;C) get particular file attributes like owner or protection in a script? &lt;BR /&gt;C1: Use DCL F$FILE lexical &lt;BR /&gt;C2: Check out PERL. All the Unix fstat file functions like -M for modification timer, or -s for size are there.&lt;BR /&gt;D) trying to print a first field on a line?&lt;BR /&gt;D1) as per Duncan... DCL Lexical F$ELEMENT (often on F$EDIT TRIM+COMPRESS pre-process)&lt;BR /&gt;D2) use standard PERL techiques.&lt;BR /&gt;&lt;BR /&gt;Overall i suspect the answer is : use Perl !&lt;BR /&gt;Cheers,&lt;BR /&gt;Hein&lt;BR /&gt;</description>
      <pubDate>Tue, 15 Feb 2011 14:40:05 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/same-function-with-awk-in-unix/m-p/4753039#M101240</guid>
      <dc:creator>Hein van den Heuvel</dc:creator>
      <dc:date>2011-02-15T14:40:05Z</dc:date>
    </item>
    <item>
      <title>Re: same function with awk in unix</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/same-function-with-awk-in-unix/m-p/4753040#M101241</link>
      <description>Update? &lt;BR /&gt;&lt;BR /&gt;Thanks,&lt;BR /&gt;Hein&lt;BR /&gt;</description>
      <pubDate>Thu, 17 Feb 2011 04:18:28 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/same-function-with-awk-in-unix/m-p/4753040#M101241</guid>
      <dc:creator>Hein van den Heuvel</dc:creator>
      <dc:date>2011-02-17T04:18:28Z</dc:date>
    </item>
  </channel>
</rss>

