this is what I have... Anyone's halp is greatly appreciated =)
meow@mix~
gawk -F" " '{print $5,$6,$7,$8}' asdf.txt |
sed 's\[coy|cor|" "|•|*|«|.|i]\\g' |
sed 's\[o|O]\0\g' | sed 's\[l|L|!]\1\g' | sed 's\?\7\g' |
cut -d "." -f1>quote.txt;
awk/sed ==> macro scheduler
Moderators: JRL, Dorian (MJT support)
-
- Pro Scripter
- Posts: 60
- Joined: Tue Dec 22, 2009 9:51 am
- Location: Mannheim ( Germany )
- Contact:
Re: awk/sed ==> macro scheduler
Ok correct me if i am wrong ....you will read a file with the name asdf.txt andmeowness wrote:this is what I have... Anyone's halp is greatly appreciated =)
meow@mix~
gawk -F" " '{print $5,$6,$7,$8}' asdf.txt |
sed 's\[coy|cor|" "|•|*|«|.|i]\\g' |
sed 's\[o|O]\0\g' | sed 's\[l|L|!]\1\g' | sed 's\?\7\g' |
cut -d "." -f1>quote.txt;
get out the 5th 6th 7th 8th element out of the asdf.txt. separated by space
in this output you are searching for coy or cor or space or dot or asterisk and so on to a new output wich gets filterd and filtered again ....
then cut the line at the dot and put out field number 1 delimeterd by dot and write the output of the file in quote.txt. I know its a one line thing in unix
I done only the first part to show how it could work
// the first part gawk -F" " '{print $5,$6,$7,$8}' asdf.txt
// defining the separators
Let>delimeter=SPACE
Let>dot=.
Let>ilinecounter=1
// Set counter for filelength
Let>count=0
Label>Start
Let>count=count+1
ReadLn>C:\Users\schumi1\Desktop\asdf.txt,count,line
If>line=##EOF##,end
Goto>Start
Label>end
// now i know how many lines i have to go
Let>i=1
// Read line and output element 5 to 8
Repeat>i
ReadLn>C:\Users\schumi1\Desktop\asdf.txt.,%i%,strLine
separate>strline,delimeter,Arrayline
Let>output1=%Arrayline_5% %Arrayline_6% %Arrayline_7% %Arrayline_8%
// with the position command u can check if there is a cor or coy
// inside before u write the outputline
// cut -d" " = separate>strline,delimeter,Arrayoutput
WriteLn>C:\Users\schumi1\Desktop\asdfnew.txt,err,output1
Let>i=i+1
Until>i,count
// now u can filter the elements with the command.....Position
// i hope this gets helped to finished a script that works for u
Oliver Hilger Mannheim
alias Olllllliii
alias Olllllliii