in ,

Rename files in linux / bash using mv command without typing the full name two times, Hacker News

Rename files in linux / bash using mv command without typing the full name two times, Hacker News

    Rename files in linux / bash using mv command without typing the full name two times   

  

              

      

        

      

        

      

        

      

        

      

        

      

        

      

      

         # Put this function to your .bashrc file.                 Usage: mv oldfilename        (# If you call mv without the second parameter it will prompt you to edit the filename on command line. # Original mv is called when it’s called with more than one argument. # It’s useful when you want to change just a few letters in a long name. function mv () { if [ $# -ne 1 ] then                 command (mv) $ @                 return                 fi                 if [ ! -f $1 ] ; then                 command file $ @          return                 fi                          (read -ei $ 1 newfilename                 (mv -v) ) $ 1 $ newfilename       

      

         }   

(Read More)

What do you think?

Leave a Reply

Your email address will not be published. Required fields are marked *

GIPHY App Key not set. Please check settings

Trump claims 'total authority' and attacks media in chaotic coronavirus briefing – The Guardian, Theguardian.com

Trump claims 'total authority' and attacks media in chaotic coronavirus briefing – The Guardian, Theguardian.com

Trump claims “total authority” to override governors, force states to reopen, Ars Technica

Trump claims “total authority” to override governors, force states to reopen, Ars Technica