CLI Fu: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
Line 10: | Line 10: | ||
<pre>ls -l | awk '{print $5}' | awk '{sum += $1} END {print sum}'</pre> | <pre>ls -l | awk '{print $5}' | awk '{sum += $1} END {print sum}'</pre> | ||
<pre>ls -l | awk '{sum += $5} END {print sum}'</pre> | <pre>ls -l | awk '{sum += $5} END {print sum}'</pre> | ||
= Backup Audio CDs = | |||
== Store Image == | |||
<pre> | |||
cdrdao read-cd --read-raw --driver generic-mmc:0x20000 --datafile cdimage.bin cdimage.toc && toc2cue cdimage.toc cdimage.cue | |||
</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