[K12OSN] Plea for Offlist sed/awk help...

Shawn Powers spowers at inlandlakes.org
Wed Sep 15 14:20:29 UTC 2004


I'm really sorry to ask for plain old help -- but I have to get some 
data mangled, and sed/awk is kicking my butt. :)

I have one big data file that I need to modify before I can "awk" it 
into different files/folders.  I'm more comfortable with awk than with 
sed, so here's my problem:

I need to take a chunk of data (that has been awked out of the big data 
file) and remove all the spaces, then chop off the last 2 characters. 
After that, I'm pretty sure I can use awk to create folders based on 
certain fields, and copy specific data into files named by other fields. 
  It's just that bit of "seding" that has got me...

Here's a sample of my chunk of the specific field of data:

"MAT 101     6 8"
"WBL -J      7 8"
"NCMC443     6 3"

That reminds me, I also need to strip those darn quotes out too. :)

I've read 100 sed tutorials, and what seems like a simple thing I just 
can't get to work.  If any kind souls would give me a hand offlist, I'd 
be ever so greatful.

Thanks in advance,
-Shawn
-- 
Shawn Powers
Technology Director
Inland Lakes Schools
PHN: 231-238-6868 x9174
FAX: 509-356-7024
spowers at inlandlakes.org
http://techcorner.inlandlakes.org

--<Disclaimer, now required for frustrating reasons>--
The views, opinions, visions, thoughts, comments,
sarcastic whims, forecasts, poetic outbursts,
cynical wit, future plans, implementation ideas,
OS preference, curricular insight, ice cream preference,
or anything else I might infer are not the
views of Inland Lakes Schools.  Pretty much everything
I say, do, think, or imply with punctuation should be
considered my own delusions, and ignored completely.





More information about the K12OSN mailing list