<?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: Copy ????.ABC ????BCD in Operating System - Linux</title>
    <link>https://community.hpe.com/t5/operating-system-linux/copy-abc-bcd/m-p/3674316#M67175</link>
    <description>SEP&lt;BR /&gt;&lt;BR /&gt;Works better without the -l in the ls command; &lt;BR /&gt;&lt;BR /&gt;Thanks !!&lt;BR /&gt;&lt;BR /&gt;The Perl script is good too ! Thanks.&lt;BR /&gt;&lt;BR /&gt;VEB</description>
    <pubDate>Fri, 18 Nov 2005 06:29:51 GMT</pubDate>
    <dc:creator>Vernon Brown_4</dc:creator>
    <dc:date>2005-11-18T06:29:51Z</dc:date>
    <item>
      <title>Copy ????.ABC ????BCD</title>
      <link>https://community.hpe.com/t5/operating-system-linux/copy-abc-bcd/m-p/3674313#M67172</link>
      <description>I'm looking for a shell script that will duplicate the Windows DOS bulk copy command, the title of this thread.&lt;BR /&gt;&lt;BR /&gt;Anyone have one handy ??</description>
      <pubDate>Thu, 17 Nov 2005 17:47:07 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/copy-abc-bcd/m-p/3674313#M67172</guid>
      <dc:creator>Vernon Brown_4</dc:creator>
      <dc:date>2005-11-17T17:47:07Z</dc:date>
    </item>
    <item>
      <title>Re: Copy ????.ABC ????BCD</title>
      <link>https://community.hpe.com/t5/operating-system-linux/copy-abc-bcd/m-p/3674314#M67173</link>
      <description>Shalom Vernon,&lt;BR /&gt;&lt;BR /&gt;ls -1 ????.ABC &amp;gt; list&lt;BR /&gt;&lt;BR /&gt;while read -r filename&lt;BR /&gt;do&lt;BR /&gt;  cp $filename ????BCD&lt;BR /&gt;done &amp;lt; list&lt;BR /&gt;&lt;BR /&gt;SEP</description>
      <pubDate>Thu, 17 Nov 2005 20:26:13 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/copy-abc-bcd/m-p/3674314#M67173</guid>
      <dc:creator>Steven E. Protter</dc:creator>
      <dc:date>2005-11-17T20:26:13Z</dc:date>
    </item>
    <item>
      <title>Re: Copy ????.ABC ????BCD</title>
      <link>https://community.hpe.com/t5/operating-system-linux/copy-abc-bcd/m-p/3674315#M67174</link>
      <description>For tasks like this I use the famous rename perl script (written by Larry Wall iirc). The rename script is (I hope this pastes ok):&lt;BR /&gt;&lt;BR /&gt;#!/usr/bin/perl&lt;BR /&gt;#&lt;BR /&gt;# use shift to extract the first command line argument - this is the string&lt;BR /&gt;# containing the Perl statement(s) to be compiled and executed.&lt;BR /&gt;# These Perl operations are stored in a $op variable.&lt;BR /&gt;&lt;BR /&gt;($op = shift) || die "Usage: rename expr [files]\n";&lt;BR /&gt;&lt;BR /&gt;chomp(@ARGV = &lt;STDIN&gt;) unless @ARGV;&lt;BR /&gt;&lt;BR /&gt;foreach (@ARGV) {&lt;BR /&gt;        # save the current file name in $was&lt;BR /&gt;        $was = $_;                              # $_ is the default loop variable&lt;BR /&gt;        eval $op;                               # compile and execute the Perl&lt;BR /&gt;                                                # operations submitted by the user&lt;BR /&gt;        die if $@;                              # means eval 'failed'&lt;BR /&gt;        rename($was, $_) unless $was eq $_;     # rename is a Perl built-in function&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Then you use it like this:&lt;BR /&gt;&lt;BR /&gt;rename 's/\.ABC$/BCD/' *.ABC&lt;BR /&gt;&lt;BR /&gt;or maybe you meant:&lt;BR /&gt;&lt;BR /&gt;rename.pl 's/\.ABC$/\.BCD/' *.ABC&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;HTH,&lt;BR /&gt;Ross&lt;/STDIN&gt;</description>
      <pubDate>Fri, 18 Nov 2005 02:40:05 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/copy-abc-bcd/m-p/3674315#M67174</guid>
      <dc:creator>Ross Minkov</dc:creator>
      <dc:date>2005-11-18T02:40:05Z</dc:date>
    </item>
    <item>
      <title>Re: Copy ????.ABC ????BCD</title>
      <link>https://community.hpe.com/t5/operating-system-linux/copy-abc-bcd/m-p/3674316#M67175</link>
      <description>SEP&lt;BR /&gt;&lt;BR /&gt;Works better without the -l in the ls command; &lt;BR /&gt;&lt;BR /&gt;Thanks !!&lt;BR /&gt;&lt;BR /&gt;The Perl script is good too ! Thanks.&lt;BR /&gt;&lt;BR /&gt;VEB</description>
      <pubDate>Fri, 18 Nov 2005 06:29:51 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/copy-abc-bcd/m-p/3674316#M67175</guid>
      <dc:creator>Vernon Brown_4</dc:creator>
      <dc:date>2005-11-18T06:29:51Z</dc:date>
    </item>
    <item>
      <title>Re: Copy ????.ABC ????BCD</title>
      <link>https://community.hpe.com/t5/operating-system-linux/copy-abc-bcd/m-p/3674317#M67176</link>
      <description>Shalom Vernon,&lt;BR /&gt;&lt;BR /&gt;Sorry for the confusion.&lt;BR /&gt;&lt;BR /&gt;thats supposed to be a dash one&lt;BR /&gt;&lt;BR /&gt;-1&lt;BR /&gt;&lt;BR /&gt;What dash one does is create a file list one file per line.&lt;BR /&gt;&lt;BR /&gt;Its possible under certain circumstances at least under hpux to get two files on the same line. dash one prevents that.&lt;BR /&gt;&lt;BR /&gt;I didn't realize with browser fonts and such I needed to clarify its not a dash el.&lt;BR /&gt;&lt;BR /&gt;SEP</description>
      <pubDate>Fri, 18 Nov 2005 07:04:14 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/copy-abc-bcd/m-p/3674317#M67176</guid>
      <dc:creator>Steven E. Protter</dc:creator>
      <dc:date>2005-11-18T07:04:14Z</dc:date>
    </item>
    <item>
      <title>Re: Copy ????.ABC ????BCD</title>
      <link>https://community.hpe.com/t5/operating-system-linux/copy-abc-bcd/m-p/3674318#M67177</link>
      <description>Hi SEP;&lt;BR /&gt;&lt;BR /&gt;I tried the script, but would up with the actual ????.EXT question marks in the file name.&lt;BR /&gt;code:&lt;BR /&gt;unzip ???????k.zip&lt;BR /&gt;ls ???????.DRF &amp;gt; list&lt;BR /&gt;while read -r filename&lt;BR /&gt;do&lt;BR /&gt;cp $filename ???????.STK&lt;BR /&gt;done &amp;lt; list&lt;BR /&gt;&lt;BR /&gt;Wound up with a file ???????.STK. I'm looking for LAD1117.STK. ( converting horse racing data files from DRF to STK file extension)&lt;BR /&gt;&lt;BR /&gt;Thanks for your help. Still needs work :o)</description>
      <pubDate>Fri, 18 Nov 2005 11:06:35 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/copy-abc-bcd/m-p/3674318#M67177</guid>
      <dc:creator>Vernon Brown_4</dc:creator>
      <dc:date>2005-11-18T11:06:35Z</dc:date>
    </item>
    <item>
      <title>Re: Copy ????.ABC ????BCD</title>
      <link>https://community.hpe.com/t5/operating-system-linux/copy-abc-bcd/m-p/3674319#M67178</link>
      <description>Tried a variation:&lt;BR /&gt;code:&lt;BR /&gt;unzip ???????k.zip&lt;BR /&gt;ls ???????.DRF &amp;gt; list&lt;BR /&gt;while read -r filename&lt;BR /&gt;do&lt;BR /&gt;cp $filename $filename.STK&lt;BR /&gt;done &amp;lt; list&lt;BR /&gt;&lt;BR /&gt;Wound up with: LAD1117.DRF.STK&lt;BR /&gt;&lt;BR /&gt;Closer but now I need to strip the .DRF; maybe there's a way to strip $filename to the first seven characters; that would do it.</description>
      <pubDate>Fri, 18 Nov 2005 11:17:20 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/copy-abc-bcd/m-p/3674319#M67178</guid>
      <dc:creator>Vernon Brown_4</dc:creator>
      <dc:date>2005-11-18T11:17:20Z</dc:date>
    </item>
    <item>
      <title>Re: Copy ????.ABC ????BCD</title>
      <link>https://community.hpe.com/t5/operating-system-linux/copy-abc-bcd/m-p/3674320#M67179</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;if it is just a mattter of shortening "filename", you could try a small change like this:&lt;BR /&gt;&lt;BR /&gt;.....&lt;BR /&gt;while read -r filename&lt;BR /&gt;do&lt;BR /&gt;#insert cut of filename&lt;BR /&gt;if  [ "${#filename}" -gt  7 ]&lt;BR /&gt;then&lt;BR /&gt;        filename=$(echo "$filename" | cut -c1-7)&lt;BR /&gt;fi&lt;BR /&gt;# insert end&lt;BR /&gt;cp "$filename" "$filename.STK"&lt;BR /&gt;done &amp;lt; list&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;regards,&lt;BR /&gt;John K.</description>
      <pubDate>Sat, 19 Nov 2005 14:29:09 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/copy-abc-bcd/m-p/3674320#M67179</guid>
      <dc:creator>john korterman</dc:creator>
      <dc:date>2005-11-19T14:29:09Z</dc:date>
    </item>
    <item>
      <title>Re: Copy ????.ABC ????BCD</title>
      <link>https://community.hpe.com/t5/operating-system-linux/copy-abc-bcd/m-p/3674321#M67180</link>
      <description>Thanks John; works great !!&lt;BR /&gt;&lt;BR /&gt;Vern</description>
      <pubDate>Sat, 19 Nov 2005 16:17:33 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/copy-abc-bcd/m-p/3674321#M67180</guid>
      <dc:creator>Vernon Brown_4</dc:creator>
      <dc:date>2005-11-19T16:17:33Z</dc:date>
    </item>
  </channel>
</rss>

