[TriLUG] bash question

David Brain dbrain at gmail.com
Wed Oct 17 15:46:18 EDT 2007


Hmm.. so something like this would find everything (even if it wasn't in fstab)

fdisk -l | grep -o "^/dev/[hs]d[a-z][1-9]"

David

On 10/17/07, Joseph Mack NA3T <jmack at wm7d.net> wrote:
> On Wed, 17 Oct 2007, Magnus wrote:
>
> > Try this:
> >
> > awk '{ print $4 }' /proc/partitions | grep -e '^[h,s]d.$'
>
> holy cow! neat!
>
> (I've been scratching my head about handling sd. and hd.
> disks and thought I'd handle that later.)
>
> There's a minor problem. One machine has a disk that's not
> mounted, which is why I tried the /etc/fstab route.
>
> I'm still interested in finding out how to concatenate
> strings to make commands programmatically.
>
> Thanks
> Joe
>
> --
> Joseph Mack NA3T EME(B,D), FM05lw North Carolina
> jmack (at) wm7d (dot) net - azimuthal equidistant map
> generator at http://www.wm7d.net/azproj.shtml
> Homepage http://www.austintek.com/ It's GNU/Linux!
> --
> TriLUG mailing list        : http://www.trilug.org/mailman/listinfo/trilug
> TriLUG Organizational FAQ  : http://trilug.org/faq/
> TriLUG Member Services FAQ : http://members.trilug.org/services_faq/
>



More information about the TriLUG mailing list