LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Updating gawk (https://www.linuxquestions.org/questions/linux-software-2/updating-gawk-921176/)

Xl1NntniNH7F 12-30-2011 01:43 AM

Updating gawk
 
ubuntu 10.10
I'd like to update gawk to 4.0 and would like to know how best to do so, and how to avoid any problems that may arise. I was thinking nothing depends on gawk, so I can just 'make install'.

jschiwal 12-30-2011 01:55 AM

Awk is often used to modify configuration files. You might want to use /usr/local/ as the base directory of your installation so the new command is installed to /usr/local/bin/.

Xl1NntniNH7F 12-30-2011 02:26 AM

But gawk is said to be optional:
Code:

$aptitude show gawk
...
Priority: optional

"By default, `make install' will install all the files in
`/usr/local/bin', `/usr/local/lib' etc." (http://lists.gnupg.org/pipermail/gnu...il/017811.html)

David the H. 12-30-2011 11:24 AM

gawk is optional, awk is not. awk is part of the POSIX standard and so some implementation of it must be available on your system.

I recently updated to 4.0 myself, and I did just what jschiwal said. I downloaded the source from the gnu site, let it install to /usr/local/bin, and made sure my PATH points to that location before /usr/bin. I left my package manager's installed version alone, so the system itself is still using 3.1.8, but in the shell I'm now using 4.0. When and if debian ever gets around to updating it, I can simply remove the locally compiled version and everything will be back to normal.

Xl1NntniNH7F 12-30-2011 05:53 PM

Whatever system script uses awk will be using full paths?

jschiwal 12-31-2011 12:03 AM

The PATH variable for the system will be different then a user's, because they have different environments.


All times are GMT -5. The time now is 03:41 PM.