Search Results

Search: Posts Made By: petoSVK
3,924
Posted By petoSVK
Can be this the problem: Portability: The...
Can be this the problem:

Portability:
The -v option is available with POSIX complient awk implementations. The major disadvantage of this method is, that it's not widely portable. gawk supports...
3,924
Posted By petoSVK
BTW, eval $(nawk -v action='choose' -f file.awk...
BTW,
eval $(nawk -v action='choose' -f file.awk input.txt)
doesn't work...
I tried to print out action in nawk
print action
print $action

I still fail to pass any value into nawk
3,924
Posted By petoSVK
I'm using BASH and it works with ' ' but I...
I'm using BASH and it works with ' '
but I still don't know how to get a value from forward.awk

I cannot find any documentation for "EVAL" in google.
3,924
Posted By petoSVK
When I write eval $( nawk -f forward.awk...
When I write
eval $( nawk -f forward.awk /var/mail/$USER )
it wants more input so I have to end it with double ^D .

Also I'm not sure if I understand it correctly. What does eval do in this...
3,924
Posted By petoSVK
Is it possible to get a value from NAWK? so I...
Is it possible to get a value from NAWK?
so I can print every message and let user choose which mail to delete and after that I would get which mail he chose and after that I would call nawk again...
3,924
Posted By petoSVK
Exactly what I wanted...:) Thanks a lot... ...
Exactly what I wanted...:)

Thanks a lot...

Peto
3,924
Posted By petoSVK
AWK -> getting "global" vars
Hello,

presently, I'm calling nawk from my main script and have nawk defined in one file. So I call nawk like this
nawk -f file input

This file defines how to separate mails in /var/mail/$user...
18,309
Posted By petoSVK
Well, I'm just a newbie too, but I will If I am...
Well, I'm just a newbie too, but I will If I am able.
18,309
Posted By petoSVK
Hey Garric, I've solved by using a special...
Hey Garric,

I've solved by using a special variable which I set OFF after reading main header ("From <mail.adress>...") and set it on after reading on of sub-headers("From, content-length...").
...
6,242
Posted By petoSVK
Clear screen in NAWK
Hello guys,

I wonder if it is possible to clear out the screen in AWK.
I'm printing out mail messages and I would like every message starting on the beginning of the screen. When I use FOR loop...
18,309
Posted By petoSVK
I've solved it :))... But be sure I'll be back...
I've solved it :))...
But be sure I'll be back with another problem :rolleyes:
18,309
Posted By petoSVK
Hello, I thought I would the rest alone, but I...
Hello, I thought I would the rest alone, but I cannot make it.

I had to remove "/^From /" before main part of AWK, so it doesnt omit text behind block, which starts with "From ", separated with...
18,309
Posted By petoSVK
Works flawlessly now :))). Its nice to have...
Works flawlessly now :))).

Its nice to have such a good forum :).
18,309
Posted By petoSVK
Ok.I'll try to start expressing myself a bit...
Ok.I'll try to start expressing myself a bit better :).

Firstly, I considered last character '1' in peto.awk to be a typo so I didn't include it. But now as you've comment it, I see I was wrong....
18,309
Posted By petoSVK
I got it, but wasnt sure. Now I understand it...
I got it, but wasnt sure. Now I understand it thx.

Is it possible to read from STDIN in NAWK? I cannot find it on internet. I would like to write max. 3 Mail Headers and then wait for user to...
18,309
Posted By petoSVK
Yup..it helps..:)...though I'm not sure how it...
Yup..it helps..:)...though I'm not sure how it works.
So

headers="(^From )|(^Message-ID:)|(^Date:)|(^From:)|(^To:)|(^Subject:)"
headers can start with (From,Message-ID,Date...)

/^From/
and...
18,309
Posted By petoSVK
THIS IS ONE MESSAGE(TEXT in RED is written by...
THIS IS ONE MESSAGE(TEXT in RED is written by MAIL program as Message content - I'd like the same):

From newbie@gmail.com Thu May 18 10:17:58 2006
Return-Path: <newbie@gmail.com>
Received: from...
18,309
Posted By petoSVK
Well, as far I know it is separated by Headers ...
Well, as far I know it is separated by Headers
From 'name' 'date' ...
TEXT

From ...

But, there is some TEXT just behind the header that isn't printed out by 'mail', cuz its info about the...
18,309
Posted By petoSVK
Any ideas how to get just one message from...
Any ideas how to get just one message from /var/mail/user?
18,309
Posted By petoSVK
READING mail from /var/mail/user
Hello guys,

I'm in desperate need. I need to write a script that behaves like a "mail" shell program.

I've a base of the program -menu and so on, but what I cannot do is how to read messages...
Showing results 1 to 20 of 20

 
All times are GMT -4. The time now is 09:54 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy