04-02-2012
Generate Codes based on start and End values of numbers in a column
Hello All,
Could you please help with this.
This is what I have:
506234.222 2
506234.222 2
506234.222 2
506234.222 2
508212.200 2
508212.200 2
333456.111 2
333456.111 2
333456.111 2
333456.111 2
But this is what I want:
506234.222 1
506234.222 2
506234.222 2
506234.222 3
508212.200 1
508212.200 3
333456.111 1
333456.111 2
333456.111 2
333456.111 3
Such that 1 indicates the begining of a value and 3 the end of same value in a column of different values
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Dear Guyz:)
I have 2 different input files like this. I would like to pick the values or letters from the inputfile2 based on inputfile1 keys (A,F,N,X,Z).
I have done similar task by using awk but in that case the inputfiles are similar like in inputfile2 (all keys in 1st column and values in... (16 Replies)
Discussion started by: repinementer
16 Replies
2. UNIX for Dummies Questions & Answers
Hello People,
I have the following contents in an XML file
...........
...........
..........
...........
<Details = "Sample Details">
<Name>Bob</Name>
<Age>34</Age>
<Address>CA</Address>
<ContactNumber>1234</ContactNumber>
</Details>
...........
.............
.............. (4 Replies)
Discussion started by: sushant172
4 Replies
3. UNIX Desktop Questions & Answers
Hi,
I have a single column of numbers from in tabulated text format ranging from 0 to 1. I want to manipulate the list of numbers so that if the number is greater than 0.5 (> 0.5), I get 1 - number. If the number is less than 0.5, the number is taken as it is and not altered. For example:
... (1 Reply)
Discussion started by: evelibertine
1 Replies
4. Shell Programming and Scripting
Hi All,
I need help for doing the following.
I have a input file like:
aaaaaaaaaabbbbbbbbbbbbbbbbbbbb
cccbbbbbaaaaaadddddaaaabbbbbbb
now I am trying to generate a output csv file where i will have for e.g.
0-3 chars of each line as the first column in the csv, 4-10 chars of the line as... (3 Replies)
Discussion started by: babom
3 Replies
5. UNIX for Dummies Questions & Answers
Hi, I have a file1 of many long sequences, each preceded by a unique header line. file2 is 3-columns list: headers name, start position, end position. I'd like to extract the sequence region of file1 specified in file2.
Based on a post elsewhere, I found the code:
awk... (2 Replies)
Discussion started by: pathunkathunk
2 Replies
6. Shell Programming and Scripting
Hello friends,
I have a text file with many columns (no. columns vary from row to row) separated by space. I need to collect all the values from 18th column to the end from each line and group them as pairs and then numbering like below..
1. 18th-col-value 19th-col-value 2. 20th-col-value ... (5 Replies)
Discussion started by: prvnrk
5 Replies
7. Shell Programming and Scripting
Hi,
I have a table to be imported for R as matrix or data.frame but I first need to edit it because I've got several lines with the same identifier (1st column), so I want to sum the each column (2nd -nth) of each identifier (1st column)
The input is for example, after sorted:
K00001 1 1 4 3... (8 Replies)
Discussion started by: sargotrons
8 Replies
8. Shell Programming and Scripting
Dear All,
I have to solve the following problems with multiple tab-separated text file but I don't know how. Any help would be greatly appreciated. I have access to Linux mint (but not as a professional).
I have multiple tab-delimited files with the following structure:
file1:
1 44
2 ... (5 Replies)
Discussion started by: Bastami
5 Replies
9. UNIX for Beginners Questions & Answers
Hi, In my previous post ( How to print lines from a files with specific start and end patterns and pick only the last lines? ), i have got a help to get the last select statement from a file, now i need to remove/exclude the output from main file:
Input File format:
SELECT
ABCD,
DEFGH,... (2 Replies)
Discussion started by: nani2019
2 Replies
10. UNIX for Beginners Questions & Answers
Below are my custom period start and end dates based on a calender, these dates are placed in a file, for each period i need to split into three weeks for each period row, example is given below.
Could you please help out to achieve solution through shell script..
File content:
... (2 Replies)
Discussion started by: nani2019
2 Replies
LEARN ABOUT DEBIAN
ts_packet_insert
TS_PACKET_INSERT(1) User Commands TS_PACKET_INSERT(1)
NAME
ts_packet_insert - insert packets into a Transport Stream
DESCRIPTION
Usage:
ts_packet_insert [switches] <infile> [switches]
Insert TS packets into a Transport Stream at a positions specified by the user.
Input:
<infile>
A H.222.0 TS stream.
Switches:
-p [positions]
This a a colon (':') delimited string of numbers between 0 and 1, representing how far through to put each ts packet. E.g. -p
0.1:0.4:0.7:0.9 will insert 4 packets at 10%, 40%, 70% and 90% through the file.
-pid [pid]
The inserted packets will have the pid specfied.
-s [string]
The inserted packets will contain [string] as it's payload.
-o [output file] The new TS file will be written out to the file
specified. (defaults to out.ts)
-h (--help)
This message.
Example:
ts_packet_insert -p 0.3:0.6 -o out.ts -pid 89 -s "AD=start" in.ts
ts_packet_insert [switches] <infile> [switches]
Insert TS packets into a Transport Stream at a positions specified by the user.
Input:
<infile>
A H.222.0 TS stream.
Switches:
-p [positions]
This a a colon (':') delimited string of numbers between 0 and 1, representing how far through to put each ts packet. E.g. -p
0.1:0.4:0.7:0.9 will insert 4 packets at 10%, 40%, 70% and 90% through the file.
-pid [pid]
The inserted packets will have the pid specfied.
-s [string]
The inserted packets will contain [string] as it's payload.
-o [output file] The new TS file will be written out to the file
specified. (defaults to out.ts)
-h (--help)
This message.
Example:
ts_packet_insert -p 0.3:0.6 -o out.ts -pid 89 -s "AD=start" in.ts
SEE ALSO
The full documentation for ts_packet_insert is maintained as a Texinfo manual. Please check http://tstools.berlios.de for more informa-
tion.
ts_packet_insert 1.11 November 2008 TS_PACKET_INSERT(1)