grdsample: command not found

Have You tried accessing the binary with the full path?

Maybe Your $PATH variable doesn't contain the default paths? echo $PATH should give something like:

[root@server ~]# echo $PATH
/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin

If it's empty, You may set the PATH variable with this command

export PATH="/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin"

On CentOS possible default full paths are:

/usr/bin/grdsample - from package: GMT

You may install the required package with command yum install {package}

On Debian possible default full paths are:

/usr/lib/gmt/bin/grdsample - from package: GMT

You may install the required package with command apt-get install {package}
Error in other languages:
grdsample: bevel nie gevind nie
grdsample: comandă negăsită
grdsample: comando não encontrado
grdsample: commande introuvable
grdsample: command not found
grdsample: käsku ei ole
grdsample: không tìm thấy lệnh
grdsample: komanda nerasta
grdsample: Kommando nicht gefunden.
grdsample: kommandot finns inte
grdsample: komut yok
grdsample: nie znaleziono polecenia
grdsample: níor aimsíodh an t-ordú
grdsample: no se encontró la orden
grdsample: no s'ha trobat l'ordre
grdsample: opdracht niet gevonden
grdsample: parancs nem található
grdsample: perintah tidak ditemukan
grdsample: príkaz nenájdený
grdsample: příkaz nenalezen
grdsample: команда не найдена
grdsample: командата не е открита
grdsample: 命令找不到
grdsample: コマンドが見つかりません