Skip to content

Instantly share code, notes, and snippets.

@AlexCallejas
Created February 27, 2018 04:30
Show Gist options
  • Save AlexCallejas/76090a832c913c47c3f88f842e47dcad to your computer and use it in GitHub Desktop.
Save AlexCallejas/76090a832c913c47c3f88f842e47dcad to your computer and use it in GitHub Desktop.
#!/bin/bash
for i in $(ls -1 workdir/); do echo $i| awk -F'.' '{ parte1=substr($1,1,17); parte2=substr($1,18,1); parte3=substr($1,19,18); parte2++ ;print "cp workdir/"$0,"newfiles/"parte1 parte2 parte3"."$2"."$3 }';done | bash
@AlexCallejas
Copy link
Author

Script en bash, ganador del segundo lugar del #SysArmyMx Challenge:
http://www.rootzilopochtli.com/2018/02/sysarmymx-challenge/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment