The problem is that the null string as FS separator is treated differently in older AWK implementations.
From Effective GAWK Programming:
Quote:
There are times when you may want to examine each character of a record separately.
This can be done in gawk by simply assigning the null string ("") to FS. In
this case, each individual character in the record becomes a separate field.[...]
Traditionally, the behavior of FS equal to "" was not defined. In this case, most
versions of Unix awk simply treat the entire record as only having one field. (d.c.)
In compatibility mode (see the section “Command-Line Options” in Chapter 11), if
FS is the null string, then gawk also behaves this way
I mean:
---------- Post updated at 02:45 PM ---------- Previous update was at 02:43 PM ----------
Quote:
Originally Posted by ahmad.diab
[...]
but my question is how I can set the FS variable to null FS="" using solaries 10??
You already did it, but it has a different meaning for your AWK implementation.
And of course, you can install gawk on Solaris .
Hi all,
I have searched and found various threads about removing spaces from a field within a text file. Unfortunately, I have not found exactly what I'm looking for, nor am I adept enough to modify what I've found into what I need.
I use the following command to remove the first line... (3 Replies)
Hi ALL
I have one input file say FILE1 which looks as below.
a=1
b=2
c=3
a=4
b=5
c=6
.
.
.
Here a,b,c...etc are variable names.
The output file(FILE2) should look like
1,2,3
4,5,6
.....
..... (5 Replies)
I desperately need to write a script that go into text documents that list the location of files in small caps and have it convert the directories and subdirectories that lead to the file as Title Caps while leaving the file itself in small caps... to illustrate what I mean:
I need to turn txt... (6 Replies)
Hi Friends,
I am Stuck up with a problem on transposing Rows to Coloumns.. Though there are many threads on this my problem is little difficult..
I have a tab separated file like Below,
computer selling_loc currency_type manufacturer_name salesweek-wk1 sales-wk2 ...wk-3 ..wk4 till... (7 Replies)
I have a csv that looks like this:
,yude-to-nap2,0,0,0,0,0
,2twis-yude-to-nap2,0,0,0,0,0
,2tiws-yude-to-nap2,0,0,0,0,0
,2arcos-yude-to-nap2,0,0,0,0,0
and another file named m1 that has a single line of text as content:
Feb 1 15:30:20
How can I fill the whole the empty column of the... (1 Reply)
Greetings.
I've got a csv file with data along these lines:
Spumoni's Pizza Place, Placemats n Things, Just Lamps
Counterfeit Dollars by Vinnie, Just Shades, Dollar StoreI want to replace the entire comma-delimited field if it matches something ending in "Place" or beginning with "Dollar",... (2 Replies)
I am looking to write a script that will read the php.ini files on my web host. If the two lines do exist do nothing. If not append two lines to the end of it then move on to the next directory and open the next php.ini file.
I have the beginning of one that was given to me on another web site but... (6 Replies)
I want to search a small string in a large string and find the locations of the string. For this I used grep "string" -ob <file name where the large string is stored>. Now this gives me the locations of that string. Now how do I store these locations in a text file.
Please use CODE tags as... (7 Replies)
Discussion started by: ANKIT ROY
7 Replies
LEARN ABOUT PLAN9
transpose
TRANSPOSE(9.1) TRANSPOSE(9.1)
NAME
rotate, transpose - re-orient an image
SYNOPSIS
fb/rotate angle [ input ]
fb/transpose [ -vhadrlui ] [ -ox y ] [ input ]
DESCRIPTION
Rotate rotates the image in its input picture file (default standard input) clockwise by angle degrees, writing the resulting picture file
on standard output.
Transpose turns its input picture file on its side by reflection through its major (descending from left to right) diagonal, writing the
resulting picture file on standard output. If no file name is given, the picture is read from standard input. Options yield all possible
symmetries of the square grid:
-d reflects the image through its descending diagonal (the default).
-a reflects the image through its ascending diagonal.
-v reflects the image left-to-right through its vertical center line.
-h inverts the image top-to-bottom through its horizontal center line.
-r rotates the image to the right (clockwise) 90 degrees.
-l rotates the image to the left (counterclockwise) 90 degrees.
-u rotates the image upside down (180 degrees).
-i identity transformation (for completeness only.)
-o x y translates by (x,y). Without -o, the input and output files have the same upper-left corner.
Transpose is particularly useful to convince programs that work on the rows of a picture file to operate on columns. For example
fb/transpose big |
fb/resample 48 |
fb/transpose |
fb/resample 48 >tiny
makes a tiny 48x48 version of a big picture.
SOURCE
/sys/src/fb/rotate.c
/sys/src/fb/transpose.c
SEE ALSO
picfile(9.6), resample(9.1)
BUGS
Very large images may not fit in memory. The result of rotate is not anti-aliased.
TRANSPOSE(9.1)