how to let "this" find all hard drives correctly

hi all

I've been working on a project to create a custom centos live-cd with a tsm client installed.

so far, the kickstart script isnt working properly to add icons into a live user's desktop.

I found there is a expression looking strange. it isnt working, neither.

HARD_DISKS=\\\`egrep "[sh]d.\\\$" /proc/partitions | tr -s ' ' | sed 's/^ *//' | cut -d' ' -f4\\\`
cut: invalid byte, character or field list
Try `cut --help' for more information.
-bash: [sh]d.\$: command not found

please advice.

thanks in advances,

Frank

I can't tell you why those \\\ are for, but this command seems to work on my system.

HARD_DISKS=$(egrep "[sh]d.$" /proc/partitions | tr -s ' ' | sed 's/^ *//' | cut -d' ' -f4)
echo $HARD_DISKS
hda hdb hdc hdd