Abbreviation (used in stylised form as a logo) of the Ferrovie dello Stato ("State Railways"), the Italian national railway system - an autonomous state owned corporation (Ente) founded in 1985. Operates just over 16000 km of lines and employs around 120 thousand people. A number of private companies also exist, running secondary lines.

Update: (2002-06-14) the FS is now trading as Trenitalia (see for useful stuff like timetables and on-line booking) but still uses the stylised FS logo.

FS is one of several user-modifiable built in variables in the awk programming language.

FS is the input field separator. When awk reads data from standard input, it separates each "record" (by default, one line of text; see RS) into "fields". The value of FS determines how that's done.

By default, fields are separated by whitespace, any amount of it (/[ \t]+/, if you dig regular expressions).

For example, the following record:

    foo   bar baz

...will be split up into three fields, "foo", "bar", and "baz". Any series of spaces and/or tabs is considered to be the boundary between one field and the next. The alert reader will notice that it's impossible to have an empty field if you're doing it this way.

This default behavior is specified by a special case value for FS, a single space: " ". Any other single-character value assigned to FS will be taken as a literal string, and the field separator will be exactly that, no more and no less.

Assume that we've set FS to ",", for example:


Here, there's none of this "series" stuff; the fields we have are as follows: "foo", "", "", "bar", and "baz". Now we can have empty fields, if any turn up in the input stream.

Both kinds of behavior have their uses.

There's a third mode of operation here: If the string you assign to FS is more than one character long, the awk interpreter assumes that it's a regular expression, in which case fields are separated by any series of characters that happens to match the regex.

In all of these cases, the content of the "field separator" itself is eaten and discarded by awk when the fields are separated.

Reference: The GNU Awk User's Guide

My O'Reilly awk book is at home. The gawk manual seems to think that all of the above is standard rather than gawk-specific, but those who trust manuals are doomed to consult them, so take that with a grain of salt.

A Usenet abbreviation, still occasionally used on various for-sale boards. Literally means For Sale. Usually used in the subject line along with the item that the user is selling, as in "FS: Hamster cage & supplies." The message body then contains a brief description of the item, an asking price, and contact information.

With the advent of on-line auction services, many opportunistic posters will instead use "FA" (For Auction) to promote their wares. In that case, the message body usually consists of little more than a link to that auction's page on its respective site.

Log in or register to write something here or to contact authors.