How to Solve sed -i error:
sed -i.bak '/.*CMDLINE_LINUX.*/s#(.*)"#\1 net.ifnames=0"#' /etc/default/grub
always report the error: sed: -e expression #1, char 44: invalid reference \1 on `s’ command’s RHS
sed -i -r '/.*CMDLINE_LINUX.*/s#(.*)"#\1 net.ifnames=0"#' /etc/default/grub
Later we know that you need to add -r, because there is a backward reference – \1, and -i and -r should be written separately
Read More:
- [Solved] Sed Failed to Reference Variable error: extra characters after command
- [Solved] find command error: paths must precede expression
- Solve the error report of the find command: paths must precede expression
- [Solved] Doris 5 Doris_core Run make Error: bk_messages.hh:214:26 error: invalid conversion from ‘char‘ …
- [Solved] Fluent error: invalid command [initialize-flow
- [Solved] Linux C++ warning: ISO C++ forbids converting a string constant to ‘char*‘ [-Wwrite-strings]
- [Linux] undefined reference to `itoa’
- VMware: vmw_ ioctl_ Command error invalid parameter [How to Solve]
- Linux: How to Fix undefined reference to `itoa’
- [Solved] yum command Error: “except keyboardinterrupt, e: syntax error: invalid syntax”“
- [Solved] S3fs mount error: s3fs: unable to access MOUNTPOINT…
- linux Ubuntu Error: No command ‘setenv‘ found
- [Solved] Ubuntu tab Error: _complete:96: bad math expression: operand expected at end of string
- [Solved] Ubuntu Error: PCIe Bus Error:severity=Corrected, type=Physical Layer, id=00e8(Receiver ID)
- WPF: How to Reference Font Resource File
- How to Solve Error: “Hdaudio hdaudioc0d2: unable to bind codec”
- How to Solve Linux Error: -bash: unzip: command not found
- ERROR: Invalid subnet : invalid CIDR address: [How to Fix]
- [Solved] Yum Install Software Error: Invalid configuration value: failovermethod=priority…
- [Solved] Docker Install Error: [Errno 14] curl#60 – Peer‘s Certificate issuer is not recognized