Skip to content

Instantly share code, notes, and snippets.

@nestserau
Last active January 23, 2023 14:19
Show Gist options
  • Select an option

  • Save nestserau/1e3f425e5fc09932026a to your computer and use it in GitHub Desktop.

Select an option

Save nestserau/1e3f425e5fc09932026a to your computer and use it in GitHub Desktop.

Revisions

  1. nestserau revised this gist Feb 5, 2016. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion move_and_rename.sh
    Original file line number Diff line number Diff line change
    @@ -1 +1 @@
    find /path/to/directory -name "*.txt" -exec bash -c 'mv {} $(echo {} | sed -e "s/foo/bar/")' \;
    find /path/to/directory -name "*.ext" -exec bash -c 'mv {} $(echo {} | sed -e "s/foo/bar/")' \;
  2. nestserau revised this gist Feb 5, 2016. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion move_and_rename.sh
    Original file line number Diff line number Diff line change
    @@ -1 +1 @@
    find /var/www/mobile -name "*.txt" -exec bash -c 'mv {} $(echo {} | sed -e "s/mapping/visitconnect/" | sed -e "s/txt/mapping/")' \;
    find /path/to/directory -name "*.txt" -exec bash -c 'mv {} $(echo {} | sed -e "s/foo/bar/")' \;
  3. nestserau revised this gist Feb 5, 2016. No changes.
  4. nestserau created this gist Feb 5, 2016.
    1 change: 1 addition & 0 deletions move_and_rename.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1 @@
    find /var/www/mobile -name "*.txt" -exec bash -c 'mv {} $(echo {} | sed -e "s/mapping/visitconnect/" | sed -e "s/txt/mapping/")' \;