I have problem executing a simple script in bash. The script is like this:
#! /bin/sh
read -p 'press [ENTER] to continue deleting line'
sudo sed -ie '$d' /home/hpccuser/.profile
and when I execute the script with ./script the output is like this:
press [ENTER] to continue deleting line./script: 3: read: arg count
[sudo] password for user
I run the read command directly in terminal (copy and paste from script to terminal) and it works fine; it waits for an ENTER to be hit (just like a pause).