As knowing which version has the awk?


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting As knowing which version has the awk?
# 1  
Old 01-25-2016
As knowing which version has the awk?

friends

How do I know which version of awk using my linux?
# 2  
Old 01-25-2016
My first idea woud be to read the man page. man awk:
Quote:
-W version mawk writes its version and copyright to stdout and compiled limits to stderr and exits 0.
Others might accept the --version option, and still others don't provide anything at all.

---------- Post updated at 22:23 ---------- Previous update was at 22:15 ----------

Code:
strings /usr/bin/awk | grep -E "version|awk"
/usr/src/usr.bin/awk/../../contrib/one-true-awk/b.c
?--version
awk %s
version 20110810 (FreeBSD)
weird printf conversion %s
out of memory in awkprintf
out of memory in awksprintf
awkdelete
can't happen: bad conversion %c in format()

might yield some insight, but YMMV...

---------- Post updated at 22:28 ---------- Previous update was at 22:23 ----------

ALternatively:
Code:
strings /usr/bin/awk | grep -E "\<version\>"
?--version
version 20110810 (FreeBSD)

This User Gave Thanks to RudiC For This Post:
# 3  
Old 01-25-2016
In cases where RudiC's suggestions don't work, you can also try:
Code:
what /pathname/to/awk

or:
Code:
sccs what /pathname/to/awk

On some systems you might even get something useful from:
Code:
file /pathname/to/awk

Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

Knowing the boot files

Hi, I have experienced a situation whereby after rebooting the server, we were not able to bring it up. After further troubleshooting it was found that it was an issue with the "boot" image/file permission. Have you experienced such an issue? I was not the one who did the troubleshooting... (1 Reply)
Discussion started by: anaigini45
1 Replies

2. UNIX for Dummies Questions & Answers

Knowing when a different program modifies a file

so i was testing something on a test box running linux. i manually vi'ed the /var/log/messages file. and i noticed, the file immediately stopped being updated. it wasn't until i restarted the syslog process that events started being recorded in it again. so that tells me, the syslog process... (20 Replies)
Discussion started by: SkySmart
20 Replies

3. Shell Programming and Scripting

awk split lines without knowing the number of fields a-priori

I want to use awk to split fields and put them into a file but I don't know the number of fields for example, in the following line Ports: 22/filtered/tcp//ssh///, 53/open/tcp//tcpwrapped///, 111/filtered/tcp//rpcbind///, 543/filtered/tcp//klogin///, 544/filtered/tcp//kshell///,... (3 Replies)
Discussion started by: esolvepolito
3 Replies

4. Shell Programming and Scripting

Knowing whether the file has completely SFTP ed

Hi.. Can Anyone out there help me? I need to write a script to convert a file in EDCIDC format to CSV The files will be transfered through sftp to the box. Is there a way to check the file has finished being transfered or still transfering. so that my conversion task will be performed after... (3 Replies)
Discussion started by: ramukandada
3 Replies

5. Solaris

Knowing global zone

Hi All, I was asked these question long time back, Is there any way to know frm non-global zone to know which is the global zone it belongs? As per my knowledge there is no way and i have looked for these topic for a quite a while and researched on it .I just want to be sure if i am... (1 Reply)
Discussion started by: sahil_shine
1 Replies

6. UNIX for Dummies Questions & Answers

Rename file knowing the first 7 carachters

Hi, people. I need some help with this: i have this file " PROVEDP_???_yyyymmdd " , and i want to rename to this " IN_PROV_yyyy???.dat " . The " ??? " is the Month , but the file could be created on April, but the name coulb be March, for example.So i need to grab the 3 caracters ... (2 Replies)
Discussion started by: osramos
2 Replies

7. Shell Programming and Scripting

awk - print formatted without knowing no of cols

Hi, i want to print(f) the content of a file, but i don't know how many columns it has (i.e. it changes from each time my script is run). The number of columns is constant throughout the file. Any suggestions? (8 Replies)
Discussion started by: bistru
8 Replies

8. AIX

Knowing when is the user id expiring

HI, Do we have a command in AIX which will let us know when is the user id password getting expired!! Any advice will be of great help!! Thanks, Siddharth (0 Replies)
Discussion started by: siddhhuu
0 Replies

9. UNIX for Dummies Questions & Answers

Knowing installed software versions

Hello, Is there any command or something to know the versions of the softwares installed ? Similar to the registry in Windows, is there anything in Unix ...? We are shifting our server to other one ... so we need to install the same versions on other server also .. Please advice, ... (3 Replies)
Discussion started by: Jayathirtha
3 Replies

10. UNIX for Dummies Questions & Answers

problem knowing disk space

i am a fresh person learning sco open server 5.5:confused: how should i know that how much space is occupied & how much is free on a particular partition?please help (1 Reply)
Discussion started by: buntty
1 Replies
Login or Register to Ask a Question