gawk command not found

Asked by Bartosz Jarmuż

Hello

I am trying to create a dictionary for Apertium, according to this tutorial http://wiki.apertium.org/wiki/Apertium_New_Language_Pair_HOWTO

I am using ubuntu 11.04

at one point, I get the following error

bartek@bartek-Inspiron-1720:~/Dokumenty$ echo "houses" | lt-proc pl-en.automorf.bin | \ gawk 'BEGIN{RS="$"; FS="/";}{nf=split($1,COMPONENTS,"^"); for(i = 1; i<nf; i++) printf COMPONENTS[i]; if($2 != "") printf("^%s$",$2);}'
Command 'gawk' is available in '/usr/bin/gawk'
gawk: command not found

Please help me - what am I doing wrong? What should I do?

Cheers:)

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu gawk Edit question
Assignee:
No assignee Edit question
Solved by:
marcobra (Marco Braida)
Solved:
Last query:
Last reply:
Revision history for this message
mycae (mycae) said :
#1

change the command to use awk, rather than gawk. There are differences between the GNU awk, and posix awk, but I don't think in your case its a big deal.

Revision history for this message
Bartosz Jarmuż (bartias) said :
#2

Well, nothing changes

bartek@bartek-Inspiron-1720:~/Dokumenty$ echo "houses" | lt-proc pl-en.automorf.bin | \ awk 'BEGIN{RS="$"; FS="/";}{nf=split($1,COMPONENTS,"^"); for(i = 1; i<nf; i++) printf COMPONENTS[i]; if($2 != "") printf("^%s$",$2);}'
Command 'awk' is available in '/usr/bin/awk'
awk: command not found

Revision history for this message
Best marcobra (Marco Braida) (marcobra) said :
#3

Try this row:

echo "houses" | lt-proc pl-en.automorf.bin | gawk 'BEGIN{RS="$"; FS="/";}{nf=split($1,COMPONENTS,"^"); for(i = 1; i<nf; i++) printf COMPONENTS[i]; if($2 != "") printf("^%s$",$2);}'

Revision history for this message
Bartosz Jarmuż (bartias) said :
#4

The error is supposed to be caused by "\"??

Something has changed indeed, gotta analyse it, but it might have helped:)

Ill post the result in a second

Thanks

Revision history for this message
marcobra (Marco Braida) (marcobra) said :
#5

yes you must not type the "\" it is in place on the page you follow just to tell you the command it is on the same row...

Revision history for this message
Bartosz Jarmuż (bartias) said :
#6

Thanks marcobra (Marco Braida), that solved my question.