This article is full of Useless Uses of Cat[1] that could just use redirection operators. For instance, cat image.iso | pv >/dev/sdb could be rewritten as pv /dev/sdb A related mistake is the Useless Use of Echo, since any command of the form echo "foo" | bar can be written using here strings as bar or even bar [1] http://porkmail.org/era/unix/award.html
The Cult of DD
131–140 of 178 posts
Re: The Cult of DD
#132This article is full of Useless Uses of Cat[1] that could just use redirection operators. For instance, cat image.iso | pv >/dev/sdb could be rewritten as pv /dev/sdb A related mistake is the Useless Use of Echo, since any command of the form echo "foo" | bar can be written using here strings as bar or even bar [1] http://porkmail.org/era/unix/award.html
pv image.iso >/dev/sdbRe: The Cult of DD
#133This article is full of Useless Uses of Cat[1] that could just use redirection operators. For instance, cat image.iso | pv >/dev/sdb could be rewritten as pv /dev/sdb A related mistake is the Useless Use of Echo, since any command of the form echo "foo" | bar can be written using here strings as bar or even bar [1] http://porkmail.org/era/unix/award.html
Huh? pv can cat stuff on it's own, and it will be able to make a progress bar based on the filesize
pv image.img > /dev/sdbRe: The Cult of DD
#134This article is full of Useless Uses of Cat[1] that could just use redirection operators. For instance, cat image.iso | pv >/dev/sdb could be rewritten as pv /dev/sdb A related mistake is the Useless Use of Echo, since any command of the form echo "foo" | bar can be written using here strings as bar or even bar [1] http://porkmail.org/era/unix/award.html
>pv /dev/sdb Huh? pv can cat stuff on it's own, and it will be able to make a progress bar based on the filesize pv image.img > /dev/sdb
Re: The Cult of DD
#135This article is full of Useless Uses of Cat[1] that could just use redirection operators. For instance, cat image.iso | pv >/dev/sdb could be rewritten as pv /dev/sdb A related mistake is the Useless Use of Echo, since any command of the form echo "foo" | bar can be written using here strings as bar or even bar [1] http://porkmail.org/era/unix/award.html
>pv /dev/sdb Huh? pv can cat stuff on it's own, and it will be able to make a progress bar based on the filesize pv image.img > /dev/sdb
pv /dev/sdb
would actually need to buffer the complete file, before commencing to write to the device (and showing the progress), which would defeat the whole idea of showing progress.Re: The Cult of DD
#136This article is full of Useless Uses of Cat[1] that could just use redirection operators. For instance, cat image.iso | pv >/dev/sdb could be rewritten as pv /dev/sdb A related mistake is the Useless Use of Echo, since any command of the form echo "foo" | bar can be written using here strings as bar or even bar [1] http://porkmail.org/era/unix/award.html
In the rare case where the volume of data is large enough to make the efficiency hit noticeable on large machines, rewriting a pipeline to eliminate a leading cat makes sense. In all other cases, it is a premature and unnecessary optimization.
Re: The Cult of DD
#137Earlier quoted context omitted.
I don't know if this works but I believe it doesn't.
It doesn’t. In fact, I would be very careful using subshellsm in general, because it can lead to bugs like this one: http://danwalsh.livejournal.com/74642.html .
Re: The Cult of DD
#138Earlier quoted context omitted.
In this case, opportunity cost was real and even quantifiable.
Anyone who didn't invest $150 back then also missed the opportunity
Re: The Cult of DD
#139Earlier quoted context omitted.
I'm a Linux sysadmin/developer and I've literally never used a Linux GUI.
I want to do this so bad, but the two things that keep me running X are my browser and mpv. Oh, and viewing PDFs.