#!/bin/bash # space2nl v0.1 GPL #----------------------------------------------------------------------- which sed >/dev/null 2>&1 if [ $? -ne 0 ] then echo "sed is not installed" exit 1 fi if [ -z "$1" ] then echo "No argument given." echo "Usage: `basename $0` pass-list" exit 1 fi if [ -f $1 ] then fp=$1 cat $fp | sed ':a;N;$!ba;s/\s/ \n/g' > "$fp-new" ms=$(du -h --max-depth=0 $fp-new) echo "Size of list is [$ms]!" fi