Skip to content

Instantly share code, notes, and snippets.

View AlexCallejas's full-sized avatar

Alex Callejas AlexCallejas

View GitHub Profile
#!/bin/bash
for i in $(ls); do date1=$(echo "$i" | awk -F'[A-Z]' '{ print $1 }' | awk -F'2017' '{ print $2 }'); date2=$(echo $(echo "$i" | awk -F'[A-Z]' '{ print $1 }' | awk -F'2017' '{ print $2 }')+1 | bc); echo "$i : $date1 : $date2 : $(echo "$i" | sed s/$date1/$date2/)"; done
#!/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
from os import path
from os import listdir
import re
import shutil
import datetime
source_dir = 'workdir'
dest_dir = 'newfiles'
def moveFile(filename, new_filename):
@AlexCallejas
AlexCallejas / rootzilopochtli.txt
Last active November 30, 2017 02:04
diagrama
+--------------------------------+
| www.rootzilopochtli.com |
+----------------+---------------+
|
+------+ |
| +--------------+------------+
| | nginx reverse proxy |
| +--------------+------------+
| |
| +----------+-------+---+------------+