01-17-2013
I is at position 53 and DIALNUM at 56 if I count correctly, so it should be not a big problem to take it out. NF will not work.
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi,
I have an input data file :-
Test4599,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,2,2,Rain
Test90,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,1,0,Not Rain
etc....
I wanted to transpose these data to:-... (2 Replies)
Discussion started by: ahjiefreak
2 Replies
2. Shell Programming and Scripting
I have a requirement to transpose the below xml which is in a text file on unix:
<?xml version="1.0" ?>
<REQUEST>
<ID>XXX</ID>
<TIMESTAMP>20090720062610</TIMESTAMP>
<FLAG>Y</FLAG>
<TO_FLAG>Y</TO_FLAG>
</REQUEST>
to
<?xml version="1.0"... (13 Replies)
Discussion started by: new_ds_man
13 Replies
3. Shell Programming and Scripting
From>>>
ATOM 1 ca 2 o 3 h 4 h 5 o
dE/dx 0.2057422D-01 0.2463722D-01-0.1068047D-01-0.1495280D-01-0.3725362D-02
dE/dy -0.7179106D-02-0.1554542D-01 0.1016889D-01 0.3268502D-02-0.4888578D-01
dE/dz -0.5600872D-02 0.3110649D-01-0.4088230D-02-0.2295107D-01-0.2832048D-01
ATOM 6 h 7 h 8 o 9 h 10 h... (1 Reply)
Discussion started by: wanchem
1 Replies
4. Shell Programming and Scripting
picked this up from another thread.
echo 1st_file.csv; nawk -F, 'NR==FNR{a++;next} a{b++}
END{for(i in b){if(b-1&&a!=b){print i";\t\t"b}else{print "NEW:"i";\t\t"b} } }' OFS=, 1st_file.csv *.csv | sort -r
i need to use the above but with a slight modification..
1.compare against 3 month... (25 Replies)
Discussion started by: slashbash
25 Replies
5. Shell Programming and Scripting
Hello to all,
I hope some awk guru could help me.
I have 2 input files:
File1: Is the complete database
File2: Contains some numbers which I want to compare
File1:
"NUMBERKEY","SERVICENAME","PARAMETERNAME","PARAMETERVALUE","ALTERNATENUMBERKEY"... (9 Replies)
Discussion started by: Ophiuchus
9 Replies
6. Shell Programming and Scripting
input:
a1
a2
a3
a4
a5
a6
a7
b1
b2
b3
..
b7
..
z1
..
z7 (12 Replies)
Discussion started by: ux4me
12 Replies
7. Shell Programming and Scripting
Hi I have below requirement, need help
One file contains the meta data information and other file would have the data, match the column from file1 and with file2 and extract corresponding column value and display in another file
File1:
CUSTTYPECD
COSTCENTER
FNAME
LNAME
SERVICELVL
... (1 Reply)
Discussion started by: ravlapo
1 Replies
8. Shell Programming and Scripting
Hi Friends,
Very urgent requirement
please do needful ASAP..
Input:
|1||1|1||1|3||3|2||2|4||4|2||2|3||3|NA||0|5||5|NA||0|4||4|3||3
output:
|1||1
|1||1
|3||3
|2||2
|4||4
|2||2
|3||3
|NA||0
|5||5 (4 Replies)
Discussion started by: bharat1211
4 Replies
9. Shell Programming and Scripting
Input:
IN,A,1
IN,B,3
IN,B,2
IN,C,7
BR,A,1
BR,A,5
BR,C,9
AR,C,9
Output:
CNTRY,A,B,C
IN,1,5,7
BR,6,0,9
AR,0,0,9 (7 Replies)
Discussion started by: unme
7 Replies
10. Shell Programming and Scripting
I am trying to format the table below to the output
input:
cand week sub1 sub2 sub3 sub4
joe 1 94.19 70.99 43.93 60.14
joe 2 94.07 51.02 41.07 38.92
joe 3 26.24 30.95 44.56 67.67
joe 4 72.36 60.92 40.78 83.25
joe 5 51 70.01 44.66 82.22... (7 Replies)
Discussion started by: aydj
7 Replies
DIO_SEEK(3) 1 DIO_SEEK(3)
dio_seek - Seeks to pos on fd from whence
SYNOPSIS
int dio_seek (resource $fd, int $pos, [int $whence = SEEK_SET])
DESCRIPTION
The function dio_seek(3) is used to change the file position of the given file descriptor.
PARAMETERS
o $fd
- The file descriptor returned by dio_open(3).
o $pos
- The new position.
o $whence
- Specifies how the position $pos should be interpreted:
o SEEK_SET (default) - specifies that $pos is specified from the beginning of the file.
o SEEK_CUR - Specifies that $pos is a count of characters from the current file position. This count may be positive or nega-
tive.
o SEEK_END - Specifies that $pos is a count of characters from the end of the file. A negative count specifies a position
within the current extent of the file; a positive count specifies a position past the current end. If you set the position
past the current end, and actually write data, you will extend the file with zeros up to that position.
RETURN VALUES
EXAMPLES
Example #1
Positioning in a file
<?php
$fd = dio_open('/dev/ttyS0', O_RDWR);
dio_seek($fd, 10, SEEK_SET);
// position is now at 10 characters from the start of the file
dio_seek($fd, -2, SEEK_CUR);
// position is now at 8 characters from the start of the file
dio_seek($fd, -5, SEEK_END);
// position is now at 5 characters from the end of the file
dio_seek($fd, 10, SEEK_END);
// position is now at 10 characters past the end of the file.
// The 10 characters between the end of the file and the current
// position are filled with zeros.
dio_close($fd);
?>
PHP Documentation Group DIO_SEEK(3)