I'm using backticks to run an external command in perl, but I've got a problem.
What I want to do is to run
`mount /dev/sdb2 /mnt`
But the sdb2 is only the right parameter when I'm running it with this disk, I want to be able to run the script with any disk.
The script gets information about the source disk that I'm using (in this case the sdb), and puts it as "$source". But when I try the:
`mount $source /mnt`
It says "mount: you must specify the filesystem type"
In this case the program asks for the "2"
Any idea on how to make the script find the number that is requried, or at least how to add a "2" after the "$source" so that
$source = /dev/sdb2 and not /dev/sdb
glob) and try them all (not a good idea), or you need to get the right input from the user. The last two lines you added have me completely puzzled as to what they are supposed to mean/show.