When i put this code in terminal:
sed -i "|^if [[ -f /etc/skel/.bashrc ]]; then . /etc/skel/.bashrc; fi|d" ~/.bashrc
sed: -e expression #1, char 1: unknown command: '|'
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. It only takes a minute to sign up.Sign up to join this community
You have to indicate that you are using a different separator in
sed delete command by prepending a backslash
\ before the new separator:
sed '\|text|d' file