LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 12-30-2011, 01:43 AM   #1
Xl1NntniNH7F
Member
 
Registered: Jul 2011
Distribution: ubuntu 10.10
Posts: 42

Rep: Reputation: Disabled
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'.
 
Old 12-30-2011, 01:55 AM   #2
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
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/.
 
Old 12-30-2011, 02:26 AM   #3
Xl1NntniNH7F
Member
 
Registered: Jul 2011
Distribution: ubuntu 10.10
Posts: 42

Original Poster
Rep: Reputation: Disabled
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)

Last edited by Xl1NntniNH7F; 12-30-2011 at 03:24 AM.
 
Old 12-30-2011, 11:24 AM   #4
David the H.
Bash Guru
 
Registered: Jun 2004
Location: Osaka, Japan
Distribution: Arch + Xfce
Posts: 6,852

Rep: Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037
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.
 
Old 12-30-2011, 05:53 PM   #5
Xl1NntniNH7F
Member
 
Registered: Jul 2011
Distribution: ubuntu 10.10
Posts: 42

Original Poster
Rep: Reputation: Disabled
Whatever system script uses awk will be using full paths?
 
Old 12-31-2011, 12:03 AM   #6
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

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


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] gawk 3.1.3 vs gawk 3.1.1 sharky Programming 2 04-13-2010 01:55 PM
Using GAWK in Java SnagglezMaw Programming 3 05-28-2009 02:53 PM
gawk help.... visitnag Linux - Newbie 1 04-12-2008 11:55 AM
gawk question luxpops Programming 1 09-12-2004 04:46 AM
FS=? in gawk realos Programming 2 05-28-2003 07:30 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 12:55 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration