I been playing around w. open source *nixes since the mid 90's and have been using Linux as the system running my home computer since 2000/2001. During all of that time I have used a trackball attached to my serial port and (for most of it) an HP Deskjet 540C attached to a parallel port. I...
This is by way of a tip. I have always used ANSI codes to display colour
error messages or warning signals in batch files etc. When I moved to
Linux I was looking for a way to continue using them. There is plenty of
good stuff on the internet (a search on Google using "\330 ANSI"...
Given that I have the folloiwing chunk of program:
BEGIN {
FS = ":"
print "\n AWKSEARCH - Start:
for (i=2; i < ARGC; i++) {
if (ARGV[i] == "-d") {disponly = "y"}
else if (ARGV[i] == "-f") {fileonly = "y"}
else if (ARGV[i] ==...
Some languages allow you to put a command into a variable which will then run when the variable is called. eg:
print_field = "print $1' '$2' '$4"
might be put away at some point in a script and called later to output the contents of these fields.
It appears that this is not so...
I have a script which has got so far:
file .* | awk -F: '/text/ {print $1}'
as you can see, it hasn't got very far - but it does output a list of the filenames of files identified as text files (rather than directories, binaries or etc). The next thing I need Awk to do is open each of...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.