Why does sed exaust "sed: rename(): Not a directory" called
sed -i ~ 's/^\#\+\(PermitRootLogin\) .*$/\1 yes/g' /etc/ssh/sshd_config
The manual states:
Edit files in-place similarly to -I, but treat each file
independently from other files. In...
I'd liked to use the 'a' function of sed to append something after a given line in a file.
For instance, I want to add "ListenAddress xx.xx.xxx.xxx" after the line that begins with "#ListenAddress" in a copy of sshd_config:
Using sh I do:
# sed -E -i ""...
Letcl is a Linux shell script that checks Let's Encrypt certificates issued for a domain. I've managed to modify it to run on FreeBSD and FreeBSD embedded systems like FreeNAS. The commands the script uses that are syntactically different between Linux and FreeBSD platforms are date and sed. For...
When I set up FreeBSD, I followed an online guide that used sed to modify a few conf files. One was like this:
# sed -i 's/datasize-cur=768M/datasize-cur=4096M/' /etc/login.conf
But now while going through a book on sed, I try this on a regular file and get an error.
$ sed -i 's/MA/Mass/'...
I would expect the same output of the following two commands, but the first one looks wrong to me:
% echo abc^ABC.123 | sed 's/[^A-z0-9]/_/g'
% echo abc^ABC.123 | sed 's/[^[:alnum:]]/_/g'
abc_ABC_123By the way, gsed does the same. Am I missing something?..
I hope I am putting this in the area.
I am running FreeBSD 10.3 x86_64 ZFS with fully encrypted HDD.
I want to put a CR-LF after every uppercase Q followed by a number, i.e. Q4, Q75, Q453,
In vim, I have tried:
As well as several variations.
Al of a sudden sed began to act differently on FreeBSD 11
On FreeBSD 11.0 following script (<------> - tab character)
# cat file
sed -E -i '.orig' \
<------>-e '/^SEARCHED_LINE/ a\