[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference turris::digital_unix

Title:DIGITAL UNIX(FORMERLY KNOWN AS DEC OSF/1)
Notice:Welcome to the Digital UNIX Conference
Moderator:SMURF::DENHAM
Created:Thu Mar 16 1995
Last Modified:Fri Jun 06 1997
Last Successful Update:Fri Jun 06 1997
Number of topics:10068
Total number of notes:35879

8631.0. "awk in V4.0X" by NETRIX::"[email protected]" (Detlef Schmier) Wed Jan 29 1997 09:51

Hi,

I have a customer who found following "feature" in V4.0:
% echo "abcd.V16.LIC" | awk '{ FS = "." } {print $2}'
gives back an empty result!!!

Although Digital UNIX V3.2C makes it as expected:
% echo "abcd.V16.LIC" | awk '{ FS = "." } {print $2}'
V16


Any idea ?

Detlef.

========================================================================
Detlef Schmier @RTO                 Digital Equipment GmbH
SBU, OEM/GY                         Freischuetzstrasse 91
Field Application Engineer          D-81927 Muenchen
Pub.Tel. +49-(0)89-9591 2752        DTN 865-2752
Mobile   +49-(0)171-3357582
Fax #    +49-(0)89-9591 1278        DTN 865-1278
========================================================================
eMail    : [email protected]
URL      : http://www.digital.de/infocenter/toem-gy/detlef.html
========================================================================

[Posted by WWW Notes gateway]
T.RTitleUserPersonal
Name
DateLines
8631.1Try thisNETRIX::"[email protected]"Farrell WoodsWed Jan 29 1997 10:008
The original program was incorrect.  Try this:

% echo "abcd.V16.LIC" | awk ' BEGIN { FS = "." }  {print $2}'


	-- Farrell

[Posted by WWW Notes gateway]
8631.2EVTAI1::SAMIE_Ffrancoise [email protected]Wed Jan 29 1997 12:254
echo "abcd.V16.LIC" | awk -F . '{ print $2}' gives you the correct result

Francoise