Add new comment
Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
|
Why the needless obfuscation ? A user can just "cat" or "head" or "more" the hosts file, instead of using awk string functions. awk 'NR==3 {print substr($0,1,14)}' /etc/hosts Awk has its place, but not for looking at one line in a file. This kind of thing will throw beginners. And why use conditional constructs on the command line, like this: cd /etc/httpd/conf && cp /etc/httpd/conf/httpd.conf httpd.conf.temp where just typing the commands is easier ? cd /etc/httpd/conf cp httpd.conf httpd.conf.temp
Reply |





Recent comments
18 hours 44 min ago
20 hours 13 min ago
23 hours 47 min ago
1 day 2 hours ago
1 day 5 hours ago
1 day 6 hours ago
1 day 6 hours ago
1 day 7 hours ago
1 day 8 hours ago
1 day 9 hours ago