11

I'm new to Linux OS and studying Mobile Computing. I have to analyze files using awk. I'm using Ubuntu 14.04.

Do I need to install awk or is it inbuilt in Ubuntu?

muru
  • 193,181
  • 53
  • 473
  • 722
NIMISHAN
  • 1,535
  • 4
  • 19
  • 28
  • 4
    If you're using Ubuntu 14.04, why didn't you just run `awk` in a terminal and see for yourself? – muru Dec 17 '15 at 05:39
  • 1
    Yes its Working . I tried awk '/some_word/ {print}' file_name – NIMISHAN Dec 17 '15 at 05:41
  • 1
    You can test whether awk or any other software is installed by doing `which awk`. It will either return the path to the exe or return nothing. – Max Williams Dec 17 '15 at 10:17

1 Answers1

24

Ubuntu's desktop edition has mawk installed by default, as it's a dependency of the lsb-core package. It conforms to standard AWK, with a few extensions.

GNU awk, which has more features, needs to be installed separately:

sudo apt-get install gawk
muru
  • 193,181
  • 53
  • 473
  • 722
  • 1
    Side note - because gnu awk has more features, some of the functions are present only in gnu awk, not mawk. So some code may be incompatible. But for simple code any version will do. – Sergiy Kolodyazhnyy Dec 17 '15 at 05:52