Can you guys help me, I have two files:
File A
60|11111|
601|11111|
6012|11111|
6013|11111|
60142|11111|
File B
642|11111|
659|11111|
852|11111|
6012|11111|
6013|11111|
I want to combine the two file into:
File C
60|642|
601|642|
6012|642| (2 Replies)
Hi Guys,
I want to combine 2 files and and put together in 1 file and make two columns out it. See below desired output. Any help will be much appreciated.
inputfile1.txt
12345
67890
24580
inputfile2.txt
AAAAA
BBBBB
CCCCC (11 Replies)
Hello everybody,
I have some large files containing statistical data. The data is stored in the following generic format:
>cat my_file
1, 2, 3
1, 2, 3
1, 2, 3
>
The values of columns no.2 and 3 are expressed in bytes. I would like to transform them in Megabytes, by dividing them with... (3 Replies)
I have a text file that has three columns. But at the end of the text file, there are trailing lines that have missing second and third columns:
4 0.04972604 KLHL28
4 0.0497332 CSTB
4 0.04979822 AIF1
4 0.04983331 DECR2
4 0.04990344 KATNB1
4
4
4
4
How can I remove the trailing... (3 Replies)
Hi, I am trying to multiply column#1 with column#2 using a shell script. How can I make a for-loop script using 1st column as "i" and the second column as "j" from the following file? Please feel free to share any alternative ways to multiplying column#1 with column#2.
.06 5.0000
.49 ... (6 Replies)
Hello everyone,
I searched the forum looking for answers to this but I could not pinpoint exactly what I need as I keep having trouble.
I have many files each having two columns and hundreds of rows.
first column is a string (can have many words) and the second column is a number.The files are... (5 Replies)
Good morning all,
I have a problem that is one step beyond a standard awk compare.
I would like to compare three files which have several thousand records against a fourth file. All of them have a value in each row that is identical, and one value in each of those rows which may be duplicated... (1 Reply)
I'm trying to learn awk, but I've hit a roadblock with this problem. I have a hierarchy stored in a file with 3 columns:
id name parentID
4 D 2
2 B 1
3 C 1
1 A 5
I need to check if there are any values in column 3 that are not represented anywhere in column 1. I've tried this:
awk '{arr;}... (7 Replies)
Columns 4 and 5 are X and Y coordinates, column 6 is the elevation
I would like to add 2 new columns at the end of the file with values
the distance between first(X)(Y) and last location (X)(Y), based in 2 rows
the difference in elevation = ($6-prev6)
How to calculate the requested values... (6 Replies)
Discussion started by: jiam912
6 Replies
LEARN ABOUT HPUX
fspec
fspec(4) Kernel Interfaces Manual fspec(4)NAME
fspec - format specification in text files
DESCRIPTION
It is sometimes convenient to maintain text files on the HP-UX system with non-standard tabs, (meaning tabs that are not set at every
eighth column). Generally, such files must be converted to a standard format - frequently by replacing all tabs with the appropriate num-
ber of spaces - before they can be processed by HP-UX system commands. A format specification occurring in the first line of a text file
specifies how tabs are to be expanded in the remainder of the file.
A format specification consists of a sequence of parameters separated by blanks and surrounded by the brackets and Each parameter consists
of a keyletter, possibly followed immediately by a value. The following parameters are recognized:
The parameter specifies tab settings for the file. The value of tabs must be one of the following:
1. A list of column numbers separated by commas, indicating tabs set at the specified columns;
2. A followed immediately by an integer n, indicating tabs at intervals of n columns;
3. A followed by the name of a ``canned'' tab specification.
Standard tabs are specified by or equivalently, etc. Recognized canned tabs are defined by the command (see
tabs(1)).
The parameter specifies a maximum line size. The value of size must be an integer. Size checking is performed after
tabs have been expanded, but before the margin is inserted at the beginning of the line.
The parameter specifies a number of spaces to be inserted at the beginning of each line. The value of margin must be an
integer.
The parameter takes no value. Its presence indicates that the line containing the format specification is to be deleted
from the converted file.
The parameter takes no value. Its presence indicates that the current format is to prevail only until another format
specification is encountered in the file.
Default values (assumed for parameters not supplied) are and If the parameter is not specified, no size checking is performed. If the
first line of a file does not contain a format specification, the above defaults are assumed for the entire file. The following is an
example of a line containing a format specification:
If a format specification can be disguised as a comment, it is not necessary to code the parameter.
Several HP-UX system commands correctly interpret the format specification for a file. Among them is which can be used to convert files to
a standard format acceptable to other HP-UX system commands.
SEE ALSO ed(1), newform(1), tabs(1).
fspec(4)