samurai2 | hi there, | 03:14 |
---|---|---|
samurai2 | Is there a command in ubuntu so that I can add a line to a .conf file if it's not existed yet? | 03:14 |
samurai2 | echo "hello" >> my_file.conf | 03:15 |
samurai2 | but it will keep adding hello to the new line | 03:15 |
samurai2 | thanks :) | 03:15 |
stgraber | [ ! -e "$my_file.conf" ] && echo "hello" > my_file.conf | 03:16 |
samurai2 | stgraber : thanks for the answer, but it's replacing the whole file not adding a new line. | 03:30 |
stgraber | just >> then | 03:41 |
stgraber | well, I guess you actually want: | 03:42 |
stgraber | grep "^hello$" my_file.conf -q && echo "hello" >> my_file.conf | 03:42 |
stgraber | hmm, that's wrong, I meant: grep "^hello$" my_file.conf -q || echo "hello" >> my_file.conf | 03:42 |
stgraber | which will only append hello to the file if it's not already in there | 03:42 |
samurai2 | stgraber : thanks, it's worked now. :D | 04:07 |
samurai2 | Hi how to find a line with a word such as #*.* localhost | 06:58 |
samurai2 | where we don't care about how many space between #*.* localhost | 06:58 |
samurai2 | thanks | 06:58 |
stgraber | highvoltage: new Edubuntu image available for testing | 15:37 |
stgraber | highvoltage: FWIW I tested 14.1 yesterday and it looked reasonably good | 15:37 |
stgraber | highvoltage: we still have the weird issue where Unity starts when using flashback with compiz but I doubt we'll get that resolved by release | 15:38 |
undead_rat | I'm trying to install edubuntu with wubi, but it kept failing out at distro checks; first it was unable to locate the vmlinuz (because it had a .efi extention, rebuilt the iso to fix that) and now it's failing because 12.04.03 != 12.04.02; where should I change the 03 to 02 at? | 17:38 |
Generated by irclog2html.py 2.7 by Marius Gedminas - find it at mg.pov.lt!