Rockbox Development > Starting Development and Compiling

ipodpatcher scripting question.

<< < (2/2)

bluebrother:
well, you can redirect the command output and simply prepend /dev/
DEVICE=/dev/`./ipodpatcher -l 2>/dev/null | sed -e '/Ipod\ found/!d;s/^.*\///'`

As a different solution you could adjust the replacement to not match the /dev/ prefix. You can strip the "winpod" part similar: just replace the part in parentensis with an empty string. Check the manual for sed for details. Another great resource for beginning is the book "Linux in a nutshell".

Anyway, this is getting quite off topic here ...

jackbnymbl:
That works perfectly (and I figured out how to get rid of winpod/macpod)
Thanks for all the help! Is there any way to get it to tell me what size the iPod is? (rounded to the nearest GB)

bluebrother:
well, you could check the size of the disk using fdisk -l

But we're getting really off topic now ... this is about scripting, not Rockbox any more ;-)

jackbnymbl:
true...
In that case, my on-topic suggestion is to add an off-topic forum!

scorche:

--- Quote from: jackbnymbl on July 06, 2007, 04:44:25 PM ---true...
In that case, my on-topic suggestion is to add an off-topic forum!

--- End quote ---

No.  ;D

(This has been discussed before and shot down, as this is a technical forum and not a social forum.  A technical forum needs no off-topic forum.)

Navigation

[0] Message Index

[*] Previous page

Go to full version