[clug] Bashism desired

Kim Holburn kim.holburn at gmail.com
Tue Mar 12 06:27:47 MDT 2013


I rather like a perl script called prename.  It only does rename/move but it's quite good at bulk rename/moves and uses perl regex.




On 2013/Mar/12, at 12:47 PM, Scott Ferguson wrote:

> I often wish there was way to reduce repetition within a single command
> run in Bash to save typing and reduce errors.
> Perhaps there is and it's so obvious I've forgotten/keep overlooking it :/
> 
> Examples:-
> 1. cp some_directory_path/some_file some_directory/some_file.variation
> 2. mv some_directory_path/some_file some_directory/some_otherfile
> 
> Desired solution:-
> 1. cp some_directory_path/some_file $trick/some_file.variation
> or
> 1. cp some_directory_path/some_file $trick/.variation
> 
> 2. mv some_directory_path/some_file $trick/some_otherfile
> 
> 
> Anyone know a Bash shortcut for this?
> aliases are OK (if no other way)
> 
> TIA
> 
> Kind regards
> 
> -- 
> linux mailing list
> linux at lists.samba.org
> https://lists.samba.org/mailman/listinfo/linux

-- 
Kim Holburn
IT Network & Security Consultant
T: +61 2 61402408  M: +61 404072753
mailto:kim at holburn.net  aim://kimholburn
skype://kholburn - PGP Public Key on request 





More information about the linux mailing list