Month: June 2017

  • Walk the line…endings

    Have a file where you want to add a comma to the end of each line? $ sed ‘s/$/,/’ ip_addresses.txt | head -n2 This should work…but, wait, it didn’t. Instead, it replaced the first character of each line with a comma. Why? , , Aha, it is because the file is dos encoded. See the […]