ylliX - Online Advertising Network

environment variable not read in sed

I am trying to update sudoers via script and passing the value of $HOSTNAME and it’s not working..obviously missing something. I am expecting: %[email protected] ALL=(ALL:ALL) ALL %[email protected] ALL=(ALL:ALL) ALL Below are the many attempts and results: sed -i “/#My Customization.*/a%[email protected] ALL=(ALL:ALL) ALL\n””%”${HOSTNAME}”[email protected] ALL=(ALL:ALL) ALL” /tmp/sudoers.bak1 Returns: %[email protected] ALL=(ALL:ALL) ALL %[email protected] ALL=(ALL:ALL) ALL sed -i “/#My […]

The Need to Read

November 2022 In the science fiction books I read as a kid, reading had often been replaced by some more efficient way of acquiring knowledge. Mysterious “tapes” would load it into one’s brain like a program being loaded into a computer. That sort of thing is unlikely to happen anytime soon. Not just because it […]