Dear Don,
There is a minor issue with all those commands mentioned above. As I told, I have 30 excel files. among them few excel files have lesser rows than others. For example excel file 6 to 10 has only 2 rows, whereas other files has 3 rows as shown below.
When I execute above commands, it pasting 11th file first row along with 10th file 3rd row as given below,
Sorry for the delayed response.
Hi,
I need to paste each 10 lines of single column to several columns.
Please, can anyone tell me how to write in awk?
Input File:
22
34
36
12
17
19
15
11
89
99
56
38
29 (4 Replies)
Please help me. This is simple, but urgent problem for me. :(
I have a two files
file1
1 2 3 4 5 6
1 2 3 4 5 6
1 2 3 4 5 6
.....
file2
11 12 13 14 15
11 12 13 14 15
11 12 13 14 15
.....
1) I hope to make a new file, file 3, that consists of 2nd... (2 Replies)
Hi All,
I have a fixedwidth file of length 3000. Now i want to copy a column of 4 chars i.e( length 1678-1681) to column 1127 – 1171 to the same file.
Please let me know how can i achive using a single command in fixed width file.
Also source column length is 4 chars and target column length... (4 Replies)
Any shortcuts for doing this? I need to cut the column 4 values from File1 and paste them as column4 values of File2, but only for the (first) same number of lines as File1 . All rows in File1 are contained in File2 in the exact same order, so the cut paste should work.
File1 (with header and 3... (4 Replies)
Hello, I have a script extracting columns of useful numbers from a data file, and manipulating the numbers with awk commands. I have problems with my script...
1. There are two lines assigning numbers to $BaseForAveraging. If I use the commented line (the first one) and let the second one... (9 Replies)
Hi all,
I've multiple files. In this case 5. Space separated columns. Each file has 12 columns. Each file has 300-400K lines.
I want to get the output such that if a value in column 2 is present in all the files then get all the columns of that value and print it side by side.
Desired output... (15 Replies)
#cat data.txt
file1 folder1
file2 thisforfile2
file3 thisfolderforfile3
lata4 folder4
step 1: create the folder first in column 2
for i in `awk '{print $2}' data.txt`
do
mkdir /home/data/$i
done
step 2: locate the files in column1 and stored them into a file
for i in... (17 Replies)
Source Code of the original script is down below please run the script and try to solve this problem
this is my data and I want it column wise
2019-03-20 13:00:00:000
2019-03-20 15:00:00:000
1
Operating System
LAB
0
1
1
1
1
1
1
1
1
1
0
1 (5 Replies)
Dear all
I have a multiple directories, say for example org1, org2, org3 ..... org100 and each directory having a file namely dnaG.fasta. I need to copy all the dnaG.fasta file from each directory and paste in another directory fastconcatg. Therefore, my script has to copy dnaG.fasta file from... (5 Replies)
I have number of csv files (like tmo_2019*). In these files some files have 5th column value as V. I want to copy those files having 5th column value as V to specific directory /test/V_files/.
I tried to extract file names by below but not able to complete command for copy.
find -type f -iname... (4 Replies)
Discussion started by: Bops
4 Replies
LEARN ABOUT SUNOS
paste
paste(1) User Commands paste(1)NAME
paste - merge corresponding or subsequent lines of files
SYNOPSIS
paste [-s] [-d list] file...
DESCRIPTION
The paste utility will concatenate the corresponding lines of the given input files, and write the resulting lines to standard output.
The default operation of paste will concatenate the corresponding lines of the input files. The NEWLINE character of every line except the
line from the last input file will be replaced with a TAB character.
If an EOF (end-of-file) condition is detected on one or more input files, but not all input files, paste will behave as though empty lines
were read from the files on which EOF was detected, unless the -s option is specified.
OPTIONS
The following options are supported:
-d list Unless a backslash character () appears in list, each character in list is an element specifying a delimiter character. If a
backslash character appears in list, the backslash character and one or more characters following it are an element specifying a
delimiter character as described below. These elements specify one or more delimiters to use, instead of the default TAB charac-
ter, to replace the NEWLINE character of the input lines. The elements in list are used circularly. That is, when the list is
exhausted, the first element from the list is reused.
When the -s option is specified:
o The last newline character in a file will not be modified.
o The delimiter will be reset to the first element of list after each file operand is processed.
When the option is not specified:
o The NEWLINE characters in the file specified by the last file will not be modified.
o The delimiter will be reset to the first element of list each time a line is processed from each file.
If a backslash character appears in list, it and the character following it will be used to represent the following delimiter
characters:
Newline character.
Tab character.
\ Backslash character.
Empty string (not a null character). If is immediately followed by the character x, the character X, or any character
defined by the LC_CTYPE digit keyword, the results are unspecified.
If any other characters follow the backslash, the results are unspecified.
-s Concatenate all of the lines of each separate input file in command line order. The NEWLINE character of every line except the
last line in each input file will be replaced with the TAB character, unless otherwise specified by the -d option.
OPERANDS
The following operand is supported:
file A path name of an input file. If - is specified for one or more of the files, the standard input will be used. The standard input
will be read one line at a time, circularly, for each instance of -. Implementations support pasting of at least 12 file operands.
USAGE
See largefile(5) for the description of the behavior of paste when encountering files greater than or equal to 2 Gbyte ( 2**31 bytes).
EXAMPLES
Example 1: Listing a directory in one column
example% ls | paste -d" " -
Example 2: Listing a directory in four columns
example% ls | paste - - - -
Example 3: Combining pairs of lines from a file into single lines
example% paste -s -d" t n" file
ENVIRONMENT VARIABLES
See environ(5) for descriptions of the following environment variables that affect the execution of paste: LANG, LC_ALL, LC_CTYPE, LC_MES-
SAGES, and NLSPATH.
EXIT STATUS
The following exit values are returned:
0 Successful completion.
>0 An error occurred.
ATTRIBUTES
See attributes(5) for descriptions of the following attributes:
+-----------------------------+-----------------------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+-----------------------------+-----------------------------+
|Availability |SUNWesu |
+-----------------------------+-----------------------------+
|CSI |Enabled |
+-----------------------------+-----------------------------+
|Interface Stability |Standard |
+-----------------------------+-----------------------------+
SEE ALSO cut(1), grep(1), pr(1), attributes(5), environ(5), largefile(5), standards(5)DIAGNOSTICS
"line too long" Output lines are restricted to 511 characters.
"too many files" Except for -s option, no more than 12 input files may be specified.
"no delimiters" The -d option was specified with an empty list.
"cannot open file" The specified file cannot be opened.
SunOS 5.10 20 Dec 1996 paste(1)