Skip to content

Instantly share code, notes, and snippets.

View iwalucas's full-sized avatar

Lucas Costa iwalucas

  • The SmartPanda
  • São Paulo, Brazil / Quarteira, Portugal
View GitHub Profile
@iwalucas
iwalucas / remove_old_docker_images.sh
Created March 10, 2020 13:32
remove docker images older than XXXhours
docker image prune --all --filter until=100h
@iwalucas
iwalucas / splitter.sh
Created September 19, 2019 02:07 — forked from steezeburger/splitter.sh
Bash script for splitting large CSV files into 100 lines while keeping the header.
#!/bin/bash
FILENAME=$1
HDR=$(head -1 ${FILENAME})
split -l 100 ${FILENAME} xyz
n=1
for f in xyz*
do
if [[ ${n} -ne 1 ]]; then
echo ${HDR} > part-${n}-${FILENAME}.csv
fi