Toggle navigation
Home
Latest pastes
FAQ
Random
BitBin is shutting down!
Register
Login
space2nl
SUBMITTED BY:
Guest
DATE:
Dec. 16, 2013, 8:01 a.m.
FORMAT:
Bash
SIZE:
639 Bytes
Raw
Download
Tweet
HITS:
695
Go to comments
Report
#!/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
Please enable JavaScript to view the
comments powered by Disqus.
comments powered by
Disqus