Tnx wdk that explained a lot. You don't happen to know how to use the "reg expression thingy" so that I only get *.conf files starting with letter A and U?
It doesn't work for me also what's the $ sign doing after conf like so conf$?
Code:
bill@gates:/etc$ ls | awk '/\.conf$/ { print $1 }'
adduser.conf
brltty.conf
ca-certificates.conf
debconf.conf
deluser.conf
fdmount.conf
hdparm.conf
host.conf
inetd.conf
kernel-img.conf
ld.so.conf
lftp.conf
libao.conf
logrotate.conf
ltrace.conf
mke2fs.conf
netscsid.conf
nsswitch.conf
pam.conf
pnm2ppa.conf
popularity-contest.conf
resolv.conf
scrollkeeper.conf
sysctl.conf
syslog.conf
ucf.conf
uniconf.conf
updatedb.conf
usplash.conf
vnc.conf
wodim.conf
wvdial.conf
bill@gates:/etc$ ls | awk '/\<(a|u)\.conf$/ { print $1 }'
bill@gates:/etc$
bill@gates:/etc$ ls | awk '/\<(a|u).*\.conf$/ { print $1 }'
bill@gates:/etc$
Originally Posted by
pmasiar
I told you before that you should learn Python instead!
Awk is even worse than Perl. Good luck!
If I would program for fun or business then I'd choose Python in a heartbeat. But you know school is forcing us to learn Bash, awk, sed, etc. because we're supposed to become "great" Linux administrators when we have graduated
Bookmarks