This command:
sed -i "\|^pref\.fullscreen\.toolbarPixels|d" ~/.vmware/preferences
Works.
But this command:
perl -pi -e "\|^pref\.fullscreen\.toolbarPixels|d" ~/.vmware/preferences
Give me the output:
Backslash found where operator expected at -e line 1, near "pref\"
Backslash found where operator expected at -e line 1, near "fullscreen\"
syntax error at -e line 1, near "\|"
Execution of -e aborted due to compilation errors.
Why?
Update:
with test.txt file that contains:
melon
banana
peach
apple
This command:
perl -ni -e "print unless m|apple|; print unless m|banana|" test.txt
Returns:
melon
melon
banana
peach
peach
apple
Instead of:
melon
peach
Why?