CLI Fu: Difference between revisions

From Traxel Wiki
Jump to navigation Jump to search
No edit summary
Line 15: Line 15:
<pre>
<pre>
cdrdao read-cd --read-raw --driver generic-mmc:0x20000 --datafile cdimage.bin cdimage.toc && toc2cue cdimage.toc cdimage.cue
cdrdao read-cd --read-raw --driver generic-mmc:0x20000 --datafile cdimage.bin cdimage.toc && toc2cue cdimage.toc cdimage.cue
</pre>
<pre>
cdrdao read-cd --read-raw --datafile audiocd.bin --device /dev/cdrom --driver generic-mmc-raw audiocd.cue
</pre>
</pre>

Revision as of 00:08, 27 October 2023

Image Magick

Convert, noclobber:

ls webp/*webp | sed 's/webp//g' | awk '{print "[ -f png"$1"png ] || convert webp"$1"webp png"$1"png"}'

Convert, noclobber, thumbnail:

ls png/*png | sed 's/png//g' | awk '{print "[ -f jpg"$1"jpg ] || convert -thumbnail 256x256 png"$1"png jpg"$1"jpg"}'

Awk

Using Awk for sums:

ls -l | awk '{print $5}' | awk '{sum += $1} END {print sum}'
ls -l | awk '{sum += $5} END {print sum}'

Backup Audio CDs

Store Image

cdrdao read-cd --read-raw --driver generic-mmc:0x20000 --datafile cdimage.bin cdimage.toc && toc2cue cdimage.toc cdimage.cue
cdrdao read-cd --read-raw --datafile audiocd.bin --device /dev/cdrom --driver generic-mmc-raw audiocd.cue