06-27-2007
help in writing awk script, plz urgent
I have a file like this I have to
I have input file this , I want to give the out put in the below
input file
(NARAYANA 1 ENDING AT (100, 16383)
,NARAYANA 2 ENDING AT (100, 32766)
,NARAYANA 3 ENDING AT (100, 49149)
,NARAYANA 4 ENDING AT (100, 65535)
,NARAYANA 5 ENDING AT (200, 16383)
,NARAYANA 6 ENDING AT (200, 32766)
,NARAYANA 7 ENDING AT (200, 49149)
,NARAYANA 8 ENDING AT (200, 65535))
----------------------------------------------------
output file:
(NARAYANA 1 ENDING AT(100, 8191)
,NARAYANA 1 ENDING AT(100, 16383)
,NARAYANA 2 ENDING AT(100, 24574)
,NARAYANA 2 ENDING AT(100, 32766)
,NARAYANA 3 ENDING AT(100, 40957)
,NARAYANA 3 ENDING AT(100, 49149)
,NARAYANA 4 ENDING AT(100, 57342)
,NARAYANA 4 ENDING AT(100, 65535)
,NARAYANA 5 ENDING AT(200, 8191)
,NARAYANA 5 ENDING AT(200, 16383)
,NARAYANA 6 ENDING AT(200, 24574)
,NARAYANA 6 ENDING AT(200, 32766)
,NARAYANA 7 ENDING AT(200, 40957)
,NARAYANA 7 ENDING AT(200, 49149)
,NARAYANA 8 ENDING AT(200, 57342)
,NARAYANA 8 ENDING AT(200, 65535) )
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
guys i have sun solaries 8 under intel .. i added a new D-LINK ethernet and i need to see if the computer define it or not .. so i need to make reconfiguraion ..
what was the command ... for reconfiguration ???
thanks alot (3 Replies)
Discussion started by: tamemi
3 Replies
2. UNIX for Dummies Questions & Answers
Hi,
In my current directory, i have the following files:
x1.dat
x2.dat.gz
x3.dat
I want to use the find command and display only files which has *.dat and NOT *.gz extension files.
Please help me out.
Thanks,
Kris Kart. (2 Replies)
Discussion started by: Kris_Kart_101
2 Replies
3. Shell Programming and Scripting
Hi!
How to use awk command and set command in a shell script?
Suppose I have to fetch data from a file and change one data with another one.Say data is ABCD.Now I have to change C with X .How do I solve this one? (2 Replies)
Discussion started by: joyita bagchi
2 Replies
4. Shell Programming and Scripting
hi buddies
pls help in this matter
i have file like this input file
--------------------------
(PARTITION PARTITION_1 VALUES LESS THAN (101, 16383 ) TABLESPACE PART_1
,PARTITION PARTITION_2 VALUES LESS THAN (101, 32766 ) TABLESPACE PART_2
,PARTITION PARTITION_3 VALUES LESS THAN (101,... (3 Replies)
Discussion started by: LAKSHMI NARAYAN
3 Replies
5. Solaris
Hi all,
I want to write a script which gather all files who where having a particular name.The script should run at the end of each month. The files(Audit and health files) are generated each day. I want to gather the files seperately into corresponding folders and so that i can ftp'ed... (3 Replies)
Discussion started by: Renjesh
3 Replies
6. UNIX for Dummies Questions & Answers
i want shell script program for counting the no of times the given input word is occured in the given input file.i am unable to do this .i got some of output with awk but i need it completely with shell script program
i am waiting for the solution (4 Replies)
Discussion started by: sankar_1209
4 Replies
7. Shell Programming and Scripting
Hi frnds,
one my frnds has given resolution for my problem as below. it working great , but i couldnt understand somethings in the script.
Why ++ operator after the function calling. how these each block working. will each run for each input line sequencially or one block for all the lines... (9 Replies)
Discussion started by: Gopal_Engg
9 Replies
8. Shell Programming and Scripting
Hi friends,
I am new to UNIX.
I going to transfer files using SFTP. I am writing a script and using mget .
If i am using mget * means,
if all the files and their sub directories are transferred or not?
If suppose , the local system dose not have the sub directory then what will... (1 Reply)
Discussion started by: punitha
1 Replies
9. Shell Programming and Scripting
Hi,
I have initailized a varaible EBID as typeset Long EBID=0
i am calculating value of EBID using certian formula as below:
(( CURR_EBID= ($BANDINDEX << 27) | ($CURR_FREQ << 16) | ($CURR_CELLID << 4) | $CURR_SECTOR_VALUE ))
return $CURR_EBID
The output is as below:
+ (( CURR_EBID=... (6 Replies)
Discussion started by: kasanur
6 Replies
10. AIX
Hi All,
For listing large files i am using the following command
find /XYZ/ -xdev -size +100000 |xargs ls -l |sort -nr -k 5..And my question is i am getting more number of files with this, so not able to copy those, how can I get those all in page by page , so that I can able to copy those... (4 Replies)
Discussion started by: adminaix55
4 Replies
LEARN ABOUT PHP
imagerectangle
IMAGERECTANGLE(3) 1 IMAGERECTANGLE(3)
imagerectangle - Draw a rectangle
SYNOPSIS
bool imagerectangle (resource $image, int $x1, int $y1, int $x2, int $y2, int $color)
DESCRIPTION
imagerectangle(3) creates a rectangle starting at the specified coordinates.
PARAMETERS
o $
image -An image resource, returned by one of the image creation functions, such as imagecreatetruecolor(3).
o $x1
- Upper left x coordinate.
o $y1
- Upper left y coordinate 0, 0 is the top left corner of the image.
o $x2
- Bottom right x coordinate.
o $y2
- Bottom right y coordinate.
o $color
- A color identifier created with imagecolorallocate(3).
RETURN VALUES
Returns TRUE on success or FALSE on failure.
EXAMPLES
Example #1
Simple imagerectangle(3) example
<?php
// Create a 200 x 200 image
$canvas = imagecreatetruecolor(200, 200);
// Allocate colors
$pink = imagecolorallocate($canvas, 255, 105, 180);
$white = imagecolorallocate($canvas, 255, 255, 255);
$green = imagecolorallocate($canvas, 132, 135, 28);
// Draw three rectangles each with its own color
imagerectangle($canvas, 50, 50, 150, 150, $pink);
imagerectangle($canvas, 45, 60, 120, 100, $white);
imagerectangle($canvas, 100, 120, 75, 160, $green);
// Output and free from memory
header('Content-Type: image/jpeg');
imagejpeg($canvas);
imagedestroy($canvas);
?>
The above example will output something similar to:[NOT DISPLAYABLE MEDIA]Output of example : Simple imagerectangle() example
PHP Documentation Group IMAGERECTANGLE(3)