# How to find out awk and sed version?



## bsdmonk (Apr 30, 2010)

Dear all,
how one can find out the version of [CMD=""]awk[/CMD] and [CMD=""]sed[/CMD]
?

Regards,
bsdmonk


----------



## darkshadow (Apr 30, 2010)

*awk version*

simple google search :

```
awk --version
```
and sed version in freebsd 8 the hard way 

```
__FBSDID("$FreeBSD: src/usr.bin/sed/main.c,v 1.41.2.1.2.1 2009/10/25 01:10:29 kensmith Exp $");
```


----------



## bsdmonk (Apr 30, 2010)

Yep, works.
Sorry, I was googling for sed and version for a while, but forgot to search for awk.
At least I've tried man awk, but with no success.
Anyway, finding out sed version as well would be pretty nice.

Edit: PERFECT! I accept it.

```
__FBSDID("$FreeBSD: src/usr.bin/sed/main.c,v 1.39.10.1 2010/02/10 00:26:20 kensmith Exp $");
```


----------



## fronclynne (Apr 30, 2010)

*Not even the tacit endorsement by failure to loudly-enough denigrate it.*

My (admittedly cursory) search has lead me to suspect that FreeBSD doesn't have a version number for sed(1).  You are free (as in spbeerch*) to draw your own conclusions:  http://svn.freebsd.org/viewvc/base/release/8.0.0/usr.bin/sed/



*No endorsement of dull, FriendsÂ®-based humour at all implied by the link.


----------



## fronclynne (Apr 30, 2010)

bsdmonk said:
			
		

> Edit: PERFECT! I accept it.
> 
> ```
> __FBSDID("$FreeBSD: src/usr.bin/sed/main.c,v 1.39.10.1 2010/02/10 00:26:20 kensmith Exp $");
> ```



I wouldn't want to lead you astray, but I'm pretty suspicious that that is merely the file's revision number.


```
~> grep FBSDID /usr/src/usr.bin/sed/*
/usr/src/usr.bin/sed/compile.c:__FBSDID("$FreeBSD: src/usr.bin/sed/compile.c,v 1.34.2.1.2.1 2009/10/25 01:10:29 kensmith Exp $");
/usr/src/usr.bin/sed/main.c:__FBSDID("$FreeBSD: src/usr.bin/sed/main.c,v 1.41.2.1.2.1 2009/10/25 01:10:29 kensmith Exp $");
/usr/src/usr.bin/sed/misc.c:__FBSDID("$FreeBSD: src/usr.bin/sed/misc.c,v 1.10.30.1.2.1 2009/10/25 01:10:29 kensmith Exp $");
/usr/src/usr.bin/sed/process.c:__FBSDID("$FreeBSD: src/usr.bin/sed/process.c,v 1.50.2.1.2.1 2009/10/25 01:10:29 kensmith Exp $");
```


----------



## darkshadow (Apr 30, 2010)

fronclynne said:
			
		

> I wouldn't want to lead you astray, but I'm pretty suspicious that that is merely the file's revision number.


 I tried


----------



## gordon@ (May 1, 2010)

We don't version sed because it's a core utility; it's not provided by a 3rd party (like awk is). So using the ident strings is going to be the closest you get to a version for it.


----------

