fish shell - reading input/confirmation generates error
by lucmove from LinuxQuestions.org on (#57S7M)
I have these lines in my fish script:
Code:/sbin/dumpe2fs /dev/sda2
read -p "Press enter to continue"When the script is run, it kind of works as intended except that it generates this error:
Code:fish: Unknown command 'Press'
/root/user/.config/fish/functions/diskcheck.fish (line 1):
Press enter to continue
^
in command substitution
called on line 3 of file /root/.config/fish/functions/diskcheck.fish
in function "diskcheck"
called on standard input
with parameter list "seagate-1T /dev/sda2"I press Enter and the script goes to the next stage which is not relevant here, but that error pollutes the output. What am I doing wrong?
TIA


Code:/sbin/dumpe2fs /dev/sda2
read -p "Press enter to continue"When the script is run, it kind of works as intended except that it generates this error:
Code:fish: Unknown command 'Press'
/root/user/.config/fish/functions/diskcheck.fish (line 1):
Press enter to continue
^
in command substitution
called on line 3 of file /root/.config/fish/functions/diskcheck.fish
in function "diskcheck"
called on standard input
with parameter list "seagate-1T /dev/sda2"I press Enter and the script goes to the next stage which is not relevant here, but that error pollutes the output. What am I doing wrong?
TIA