From: Ferdous ara Date: 2012-09-08T05:41:13+09:00 Subject: regix in grep or something like this Hi /dev/cciss/c0d11p1 /dev/cciss/c0d1p1 /dev/cciss/c0d2p1 #Function to check if the Hardrive is mounted or not def mount_check(drive_path) chk_mount=`df -h | grep '#{drive_path}' | wc -l ` return chk_mount end problem is : its taking c0d1 also c0d11 but if pass variable c0d1 i just want to get line with has c0d1 , not c0d11 but confused how to do Can any one please help me -- Posted via http://www.ruby-forum.com/.