<?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: Script help in Operating System - Linux</title>
    <link>https://community.hpe.com/t5/operating-system-linux/script-help/m-p/3676241#M103370</link>
    <description>Venkat,&lt;BR /&gt;&lt;BR /&gt;If you want to capture the output of the command as well as the executed command then "script" might be what you're looking for...man script(1)&lt;BR /&gt;&lt;BR /&gt;cheers!</description>
    <pubDate>Tue, 22 Nov 2005 11:57:49 GMT</pubDate>
    <dc:creator>Sandman!</dc:creator>
    <dc:date>2005-11-22T11:57:49Z</dc:date>
    <item>
      <title>Script help</title>
      <link>https://community.hpe.com/t5/operating-system-linux/script-help/m-p/3676230#M103359</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;I want output of both like&lt;BR /&gt;&lt;BR /&gt;testin='ls -a'&lt;BR /&gt;&lt;BR /&gt;output with that command how do that</description>
      <pubDate>Tue, 22 Nov 2005 00:56:04 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/script-help/m-p/3676230#M103359</guid>
      <dc:creator>Venkat_33</dc:creator>
      <dc:date>2005-11-22T00:56:04Z</dc:date>
    </item>
    <item>
      <title>Re: Script help</title>
      <link>https://community.hpe.com/t5/operating-system-linux/script-help/m-p/3676231#M103360</link>
      <description>I am not clear as to what exactly you want.&lt;BR /&gt;&lt;BR /&gt;alias testin='ls -a'&lt;BR /&gt;&lt;BR /&gt;testin would now give what 'ls -a' would give.</description>
      <pubDate>Tue, 22 Nov 2005 01:03:46 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/script-help/m-p/3676231#M103360</guid>
      <dc:creator>RAC_1</dc:creator>
      <dc:date>2005-11-22T01:03:46Z</dc:date>
    </item>
    <item>
      <title>Re: Script help</title>
      <link>https://community.hpe.com/t5/operating-system-linux/script-help/m-p/3676232#M103361</link>
      <description>my script will do&lt;BR /&gt;&lt;BR /&gt;testin=`ls -a`&lt;BR /&gt;&lt;BR /&gt;echo $testin &amp;gt;&amp;gt; out.txt&lt;BR /&gt;&lt;BR /&gt;and also i want to include that ls -a command to that file.</description>
      <pubDate>Tue, 22 Nov 2005 01:08:10 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/script-help/m-p/3676232#M103361</guid>
      <dc:creator>Venkat_33</dc:creator>
      <dc:date>2005-11-22T01:08:10Z</dc:date>
    </item>
    <item>
      <title>Re: Script help</title>
      <link>https://community.hpe.com/t5/operating-system-linux/script-help/m-p/3676233#M103362</link>
      <description>type testin &amp;gt;&amp;gt; some_file&lt;BR /&gt;Also, you do not need to do echo $testin &amp;gt;&amp;gt; some_file, you need to do as follows.&lt;BR /&gt;&lt;BR /&gt;testin &amp;gt;&amp;gt; some_file</description>
      <pubDate>Tue, 22 Nov 2005 01:42:13 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/script-help/m-p/3676233#M103362</guid>
      <dc:creator>RAC_1</dc:creator>
      <dc:date>2005-11-22T01:42:13Z</dc:date>
    </item>
    <item>
      <title>Re: Script help</title>
      <link>https://community.hpe.com/t5/operating-system-linux/script-help/m-p/3676234#M103363</link>
      <description>hi RAC,&lt;BR /&gt;&lt;BR /&gt;its not working</description>
      <pubDate>Tue, 22 Nov 2005 01:51:19 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/script-help/m-p/3676234#M103363</guid>
      <dc:creator>Venkat_33</dc:creator>
      <dc:date>2005-11-22T01:51:19Z</dc:date>
    </item>
    <item>
      <title>Re: Script help</title>
      <link>https://community.hpe.com/t5/operating-system-linux/script-help/m-p/3676235#M103364</link>
      <description>what is not working??</description>
      <pubDate>Tue, 22 Nov 2005 01:55:41 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/script-help/m-p/3676235#M103364</guid>
      <dc:creator>RAC_1</dc:creator>
      <dc:date>2005-11-22T01:55:41Z</dc:date>
    </item>
    <item>
      <title>Re: Script help</title>
      <link>https://community.hpe.com/t5/operating-system-linux/script-help/m-p/3676236#M103365</link>
      <description>what is my question is&lt;BR /&gt;&lt;BR /&gt;i want to output the 'ls -a' to some file and also will include what command i executed for this output eg:'la -a'</description>
      <pubDate>Tue, 22 Nov 2005 02:01:35 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/script-help/m-p/3676236#M103365</guid>
      <dc:creator>Venkat_33</dc:creator>
      <dc:date>2005-11-22T02:01:35Z</dc:date>
    </item>
    <item>
      <title>Re: Script help</title>
      <link>https://community.hpe.com/t5/operating-system-linux/script-help/m-p/3676237#M103366</link>
      <description>type testin &amp;gt;&amp;gt; some_file;testin &amp;gt;&amp;gt; some_file</description>
      <pubDate>Tue, 22 Nov 2005 02:06:05 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/script-help/m-p/3676237#M103366</guid>
      <dc:creator>RAC_1</dc:creator>
      <dc:date>2005-11-22T02:06:05Z</dc:date>
    </item>
    <item>
      <title>Re: Script help</title>
      <link>https://community.hpe.com/t5/operating-system-linux/script-help/m-p/3676238#M103367</link>
      <description>Hi Venkat:&lt;BR /&gt;&lt;BR /&gt;Perhaps this is what you want (by example):&lt;BR /&gt;&lt;BR /&gt;# CMD="ls -l /var/tmp";{ echo executing: $CMD;$CMD; } &amp;gt; file&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
      <pubDate>Tue, 22 Nov 2005 07:20:26 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/script-help/m-p/3676238#M103367</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2005-11-22T07:20:26Z</dc:date>
    </item>
    <item>
      <title>Re: Script help</title>
      <link>https://community.hpe.com/t5/operating-system-linux/script-help/m-p/3676239#M103368</link>
      <description>Just to break it down to its most simple form, If I understand what you want&lt;BR /&gt;&lt;BR /&gt;echo â  output from ls â  a commandâ   &amp;gt; file.out&lt;BR /&gt;testin=$(ls â  a)&lt;BR /&gt;&lt;BR /&gt;echo $testin &amp;gt;&amp;gt; file.out&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;in this case $( ) works just like the back tick ` `&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Howard&lt;BR /&gt;</description>
      <pubDate>Tue, 22 Nov 2005 09:59:39 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/script-help/m-p/3676239#M103368</guid>
      <dc:creator>Howard Marshall</dc:creator>
      <dc:date>2005-11-22T09:59:39Z</dc:date>
    </item>
    <item>
      <title>Re: Script help</title>
      <link>https://community.hpe.com/t5/operating-system-linux/script-help/m-p/3676240#M103369</link>
      <description>ok, lets try that again&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;echo "output from ls -a command" &amp;gt; file.out&lt;BR /&gt;testin=$(ls -a)&lt;BR /&gt;&lt;BR /&gt;echo $testin &amp;gt;&amp;gt; file.out&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;see if that prints better&lt;BR /&gt;stupid Word&lt;BR /&gt;&lt;BR /&gt;Howard</description>
      <pubDate>Tue, 22 Nov 2005 11:31:00 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/script-help/m-p/3676240#M103369</guid>
      <dc:creator>Howard Marshall</dc:creator>
      <dc:date>2005-11-22T11:31:00Z</dc:date>
    </item>
    <item>
      <title>Re: Script help</title>
      <link>https://community.hpe.com/t5/operating-system-linux/script-help/m-p/3676241#M103370</link>
      <description>Venkat,&lt;BR /&gt;&lt;BR /&gt;If you want to capture the output of the command as well as the executed command then "script" might be what you're looking for...man script(1)&lt;BR /&gt;&lt;BR /&gt;cheers!</description>
      <pubDate>Tue, 22 Nov 2005 11:57:49 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/script-help/m-p/3676241#M103370</guid>
      <dc:creator>Sandman!</dc:creator>
      <dc:date>2005-11-22T11:57:49Z</dc:date>
    </item>
    <item>
      <title>Re: Script help</title>
      <link>https://community.hpe.com/t5/operating-system-linux/script-help/m-p/3676242#M103371</link>
      <description>I would to this&lt;BR /&gt;&lt;BR /&gt;export testit=`ls -a` &lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Thu, 05 Jan 2006 14:00:05 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/script-help/m-p/3676242#M103371</guid>
      <dc:creator>rmueller58</dc:creator>
      <dc:date>2006-01-05T14:00:05Z</dc:date>
    </item>
    <item>
      <title>Re: Script help</title>
      <link>https://community.hpe.com/t5/operating-system-linux/script-help/m-p/3676243#M103372</link>
      <description>" want to output the 'ls -a' to some file and also will include what command i executed for this output eg:'la -a' "&lt;BR /&gt;&lt;BR /&gt;CMD="ls -a"&lt;BR /&gt;echo "$CMD" &amp;gt; /tmp/file&lt;BR /&gt;$CMD &amp;gt;&amp;gt; /tmp/file&lt;BR /&gt;&lt;BR /&gt;This answers your question but is not very elegant.  Setting a variable to the output of a command as you posted originally is not a good idea.  It would work provided you put double quotes aruond the grave accented command provided there are not too many files present. &lt;BR /&gt;&lt;BR /&gt;Suggest you just do:&lt;BR /&gt;&lt;BR /&gt;ls -a &amp;gt; /tmp/file&lt;BR /&gt;&lt;BR /&gt;and be done with it.&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Thu, 05 Jan 2006 14:20:21 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/script-help/m-p/3676243#M103372</guid>
      <dc:creator>Tom Danzig</dc:creator>
      <dc:date>2006-01-05T14:20:21Z</dc:date>
    </item>
  </channel>
</rss>

