<?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: CP command constraints in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/cp-command-constraints/m-p/2564269#M29713</link>
    <description>Hi,&lt;BR /&gt;&lt;BR /&gt;If you'd only had two files, you'd have overwritten one with the other, since the command would expand to:&lt;BR /&gt;&lt;BR /&gt;cp file1.txt file2.txt &amp;gt; file3&lt;BR /&gt;&lt;BR /&gt;file2 would then be a copy of file1, file3 would contain nothing.&lt;BR /&gt;&lt;BR /&gt;More than 2 and you'd just get the error you describe.  Use cat, as suggested.&lt;BR /&gt;&lt;BR /&gt;Rgds, Robin.</description>
    <pubDate>Fri, 10 Aug 2001 14:48:15 GMT</pubDate>
    <dc:creator>Robin Wakefield</dc:creator>
    <dc:date>2001-08-10T14:48:15Z</dc:date>
    <item>
      <title>CP command constraints</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/cp-command-constraints/m-p/2564266#M29710</link>
      <description>I am trying to copy the contents of several files into a single file using the cp command and it is not allowing me to as it seems to need the target file to be a directory.  Is there another way to do this?  Probably a silly question but I am writing a file parser and need all the context in a single file. &lt;BR /&gt;&lt;BR /&gt;I am trying this:  cp *.txt &amp;gt;target.file&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Fri, 10 Aug 2001 14:29:04 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/cp-command-constraints/m-p/2564266#M29710</guid>
      <dc:creator>Scott McDade</dc:creator>
      <dc:date>2001-08-10T14:29:04Z</dc:date>
    </item>
    <item>
      <title>Re: CP command constraints</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/cp-command-constraints/m-p/2564267#M29711</link>
      <description>You can append files with the cat command.&lt;BR /&gt;cat file1 file2 &amp;gt;&amp;gt; file3&lt;BR /&gt;&lt;BR /&gt;Eileen</description>
      <pubDate>Fri, 10 Aug 2001 14:31:39 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/cp-command-constraints/m-p/2564267#M29711</guid>
      <dc:creator>Eileen Millen</dc:creator>
      <dc:date>2001-08-10T14:31:39Z</dc:date>
    </item>
    <item>
      <title>Re: CP command constraints</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/cp-command-constraints/m-p/2564268#M29712</link>
      <description>Hi Scott,&lt;BR /&gt;&lt;BR /&gt;cp command copies ( source ) file(s) or directory(ies) to ( destination ) file or dirctory respectively.&lt;BR /&gt;&lt;BR /&gt;examples :&lt;BR /&gt;1. cp file1 file2 file3 destDir&lt;BR /&gt;2. cp -r dir1 dir2 dir3 destDir&lt;BR /&gt;&lt;BR /&gt;If you want to copy the content of files then use cat command ( as mentioned before ).&lt;BR /&gt;&lt;BR /&gt;cat sourceFile1 sourceFile2 sourceFile3  &amp;gt;&amp;gt;  destinationFile&lt;BR /&gt;&lt;BR /&gt;Magdi</description>
      <pubDate>Fri, 10 Aug 2001 14:48:03 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/cp-command-constraints/m-p/2564268#M29712</guid>
      <dc:creator>Magdi KAMAL</dc:creator>
      <dc:date>2001-08-10T14:48:03Z</dc:date>
    </item>
    <item>
      <title>Re: CP command constraints</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/cp-command-constraints/m-p/2564269#M29713</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;If you'd only had two files, you'd have overwritten one with the other, since the command would expand to:&lt;BR /&gt;&lt;BR /&gt;cp file1.txt file2.txt &amp;gt; file3&lt;BR /&gt;&lt;BR /&gt;file2 would then be a copy of file1, file3 would contain nothing.&lt;BR /&gt;&lt;BR /&gt;More than 2 and you'd just get the error you describe.  Use cat, as suggested.&lt;BR /&gt;&lt;BR /&gt;Rgds, Robin.</description>
      <pubDate>Fri, 10 Aug 2001 14:48:15 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/cp-command-constraints/m-p/2564269#M29713</guid>
      <dc:creator>Robin Wakefield</dc:creator>
      <dc:date>2001-08-10T14:48:15Z</dc:date>
    </item>
    <item>
      <title>Re: CP command constraints</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/cp-command-constraints/m-p/2564270#M29714</link>
      <description>Hi Scott&lt;BR /&gt;&lt;BR /&gt;I tried this&lt;BR /&gt;&lt;BR /&gt;cp *.txt /&lt;DESTINATION directory=""&gt;&lt;BR /&gt;&lt;BR /&gt;like i went to /etc and gave&lt;BR /&gt;&lt;BR /&gt;cp *.log /tmp and it copied all files with *.log under /tmp with the same name .&lt;BR /&gt;&lt;BR /&gt;Also after you have copied and want to combine it into a single file then &lt;BR /&gt;&lt;BR /&gt;cat *.txt &amp;gt; &lt;NEW file="" name=""&gt; &lt;BR /&gt;&lt;BR /&gt;Manoj Srivastava&lt;/NEW&gt;&lt;/DESTINATION&gt;</description>
      <pubDate>Fri, 10 Aug 2001 15:00:27 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/cp-command-constraints/m-p/2564270#M29714</guid>
      <dc:creator>MANOJ SRIVASTAVA</dc:creator>
      <dc:date>2001-08-10T15:00:27Z</dc:date>
    </item>
    <item>
      <title>Re: CP command constraints</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/cp-command-constraints/m-p/2564271#M29715</link>
      <description>Hi Scott:&lt;BR /&gt;&lt;BR /&gt;You gotten the correct answers but why not do this the real unix way and have your parser simply read stdin (in this case a pipe) and then write to stdout.&lt;BR /&gt;&lt;BR /&gt;e.g. cat file1 file2 file3 | myprogram &amp;gt; newfile.&lt;BR /&gt;&lt;BR /&gt;This way 'myprogram' acts as a filter and is the typical way to do this in a unix environment. &lt;BR /&gt;&lt;BR /&gt;Regards, Clay</description>
      <pubDate>Fri, 10 Aug 2001 15:12:42 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/cp-command-constraints/m-p/2564271#M29715</guid>
      <dc:creator>A. Clay Stephenson</dc:creator>
      <dc:date>2001-08-10T15:12:42Z</dc:date>
    </item>
  </channel>
</rss>

