On 8 May 2010 18:35, Russ Cox wrote:
> bs=1474560
> cat $file | for(i in `{seq 0 `{ls -l $file | awk '{print
> int($6)/'$bs'}'}}) { dd -bs $bs -count 1 -of $file.$i }
that looks very plausible, but it doesn't actually work,
as awk doesn't coelesce short reads (it gets short
reads from the pipe)
i had a similar need some time back and used inferno's sh:
http://a-30.net/inferno/dis/split
arvindh
hi,
since i see many solutions, i thought i will add mine too (if you can
use inferno). attached please see the limbo program i wrote for this.
it has helped me many times: didnt have to come out with parameters
for dd commands which i used to use before for this kind of tasks.
please note that t
> but there's still a little annoyance - if the file size is an exact
> multiple of the block size, it will generate an unnecessary zero-length
> file at the end.
sometimes what should work, doesn't. that (and the whitespace)
are why my version is longer.
> i tried to fix it to get rid of this,
On 10 May 2010 12:40, erik quanstrom wrote:
> this isn't awk's fault. awk gets the right result. you've illustrated
> the dismalness of seq.
good point. i should have worked that out!
it's not the first time i've been caught out by %g - perhaps
the default precision of %g should be 12 or more.
Isn't the sensible solution to add a "-b bytes" option to split?
On Mon, May 10, 2010 at 11:01 AM, gas wrote:
> Isn't the sensible solution to add a "-b bytes" option to split?
>
split -b Considered Harmful.
On 10 May 2010, at 15:52, Iruata Souza wrote:
On Mon, May 10, 2010 at 11:01 AM, gas wrote:
Isn't the sensible solution to add a "-b bytes" option to split?
split -b Considered Harmful.
Just curious having not heard of split before, what's the purpose of
it as-is? :)
--
Simplicity doe
> Just curious having not heard of split before, what's the purpose of
> it as-is? :)
split(1) is pretty informative. in Þe auncien[t] dais, it was sometimes hard
to send big files by email or fit them on floppies or 9 track tapes.
rchistory(1) shows i haven't used it once in the last 5 years.
On 10 May 2010, at 16:39, erik quanstrom wrote:
Just curious having not heard of split before, what's the purpose of
it as-is? :)
split(1) is pretty informative. in Þe auncien[t] dais, it was
sometimes hard
to send big files by email or fit them on floppies or 9 track tapes.
rchistory(1)
On Mon May 10 12:17:49 EDT 2010, m...@endeavour.zapto.org wrote:
> Are the canonical sources to 9atom online/web-viewable someplace?
>
not currently. i'm working on that.
- erik
Are the canonical sources to 9atom online/web-viewable someplace?
-- vs
# usage: sledge /tmp/foo /tmp/bar 31415
# could also be named crowbar
fn sledge () {
ifile=$1
ofile=$2
size=$3
if (~ $#* 3) {
for (i in `{seq 0 `{ls -l $ifile | awk '{print
int($6/'^$size^')}'}}) {
echo dd -if $ifile -of $ofi
> > split -b Considered Harmful.
>
> Just curious having not heard of split before, what's the purpose of
> it as-is? :)
Do you mean what's it's use? I'm no unix (or Plan 9) elder, but I think it's a
file-based implementation of what some text editors call folding.
Not a trivial function. Be
14 matches
Mail list logo