Add new comment
Want to support HowtoForge? Become 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
22 hours 8 min ago
1 day 2 hours ago
1 day 7 hours ago
1 day 10 hours ago
1 day 10 hours ago
1 day 10 hours ago
1 day 14 hours ago
1 day 15 hours ago
1 day 17 hours ago
2 days 47 min ago