Search Results

Search: Posts Made By: ryan9011
2,482
Posted By ryan9011
for example if the number id for string B752 is...
for example if the number id for string B752 is 001. The code will replace B752 in
the file with the 001.

output for first row and its linked row will be as following

001 B295 B289
X216 001...
2,482
Posted By ryan9011
Replace string ids with unique numbers
Hello,

I have a file with a 1000 ids in the form of strings. I want to replace each id with a unique numbers in the whole file. each id is repeating in all the columns. I know I can use sed...
7,940
Posted By ryan9011
Hello, Thanks, but please tell me where I...
Hello,

Thanks, but please tell me where I will put my column names which I want to select.
7,940
Posted By ryan9011
displaying columns based on column name
Hello,

I have a huge file with many columns . I want to use the names of the columns to print columns to another file.

for example

file.txt
COLA COLB COLC COLD
1 2 3 ...
1,056
Posted By ryan9011
Tab after every two columns
Hello,

I have a huge file which contain space separated columns. I want to add a tab after every two columns in the file.

for example


input
A B C D E F G H
A B C D E F G H


output
...
1,490
Posted By ryan9011
I am using linux.
I am using linux.
1,490
Posted By ryan9011
choosing random columns from a file
Hello,

I want to choose random columns from big file.

for example: My file contain around 21000 columns and I want to randomly extract 4000 columns from this file.

Anybody has a solution...
2,115
Posted By ryan9011
Hi Ygemici, Thanks for the code but please...
Hi Ygemici,

Thanks for the code but please explain what does 2 means. Are they number of rows?

thanks
2,115
Posted By ryan9011
Convert columns to rows in a file
Hello,

I have a huge tab delimited file with around 40,000 columns and 900 rows I want to convert columns to a row.

INPUT file look like this.
the first line is a headed of a file.

ID ...
3,348
Posted By ryan9011
Hey, It is displaying required rows correctly but...
Hey, It is displaying required rows correctly but displaying all the column from file. Not the one which are mentioned in the code
3,348
Posted By ryan9011
cut -c3-68 this option is only displaying...
cut -c3-68 this option is only displaying characters of the column not the column from 3 to 68
3,348
Posted By ryan9011
yes from row 1
yes from row 1
3,348
Posted By ryan9011
Extract several columns with few rows
Hello,

I want to extract several columns and rows from a huge tab delimited file

for example: I want to print from from column 3 to 68 till row number 30.

I have tried using cut command but...
3,886
Posted By ryan9011
I have written this code but its displaying the...
I have written this code but its displaying the ids more than once and its not exactly matching id of file1 with file2.

open (MYFILE, "file1.txt");
my @extract;
while ($record = <MYFILE>) {...
3,886
Posted By ryan9011
I tired it but i wanted the it wasn't displaying...
I tired it but i wanted the it wasn't displaying results according to file1 id order. anyways thanks! :)

---------- Post updated at 08:38 AM ---------- Previous update was at 08:37 AM ----------
...
3,886
Posted By ryan9011
Extract columns by matching ids in two files
Hello,

I want to extract columns from file2 to file3 by matching ids between file1 and file2. The extracted columns should be in same order as file1 ids.

for example:

file1.txt
1823
607...
Showing results 1 to 16 of 16

 
All times are GMT -4. The time now is 03:51 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy