home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!wupost!darwin.sura.net!haven.umd.edu!mimsy!afterlife!adm!news
- From: CHUCK@bkmain.poly-east-london.ac.uk (Chuck Foster)
- Newsgroups: comp.unix.questions
- Subject: awk problems
- Message-ID: <32213@adm.brl.mil>
- Date: 26 Aug 92 14:26:36 GMT
- Sender: news@adm.brl.mil
- Lines: 14
-
- Is there any way to convert a string to lowercase/uppercase in awk scripts?
- I've tried x = strupr($1); but this just seems to return a string as is.
-
- Also, is it possible to find the offset of a token in the whole string? The
- file I am operating upon is in fixed format, and a user's full name occurs
- after column 68, for example. At the moment I have a small for loop that
- copies each token into a variable:
- for (i = 8; i <= NF; i+=1) { name = name " " $i; }
- but it would be nice to be able to extract the whole part from within $0 into
- a variable, for example, or to be able to concat a range of tokens together
- (in a similar why to $(3 .. $NF) or something.
-
- Forgive my ignorance; I've only just begun to experiment with this
- interesting command ... :-)
-