Search Results

Search: Posts Made By: senayasma
1,763
Posted By senayasma
Hi Ahamed, I do not know why this code...
Hi Ahamed,

I do not know why this code gives me syntax error.
Could you please help me to figure it out?

Thanks for your time,
1,763
Posted By senayasma
Question is howmany values in the 1st column of...
Question is howmany values in the 1st column of the file1 are smaller than the 1st value given in file2, etc.

Example.
file1 has 5 column and 3 rows


cat file1

0.6 0.4 0.9 0.8 0.53 ...
1,763
Posted By senayasma
Hi Ahamed, Thanks for helping me. No it is...
Hi Ahamed,

Thanks for helping me. No it is not a homework. These are two files to get the permutated p-values in GWAS.

That script is pretty fast, however it giving the number of columns...
1,763
Posted By senayasma
Number of lines smaller than specified value
Hi All,

I have a problem to find number of lines per column smaller than the values given in a different file. In example, compare the 1st column of file1 with the 1st line of the file2, 2nd...
2,861
Posted By senayasma
Hi vgersh99, Thanks for reminding my old...
Hi vgersh99,

Thanks for reminding my old thread. Actually, i do not know how i can see only the threads posted by me. So, i lost it. Now, i see the solution.

I appreciate your reminding.
2,861
Posted By senayasma
file2.txt is just only 1 line.
file2.txt is just only 1 line.
2,861
Posted By senayasma
extract the lines by index number
Hi All,

I want to extract the lines from file1 by using the index numbers from file2. In example,


cat file1.txt

265 ABC 956 ...
698 DFA 456 ...
456 DDD 145 ...
125 DSG 154 ......
2,857
Posted By senayasma
These two commands work great. ----------...
These two commands work great.

---------- Post updated at 10:54 AM ---------- Previous update was at 10:52 AM ----------

Sorry for the misunderstanding jayan_jay.
2,857
Posted By senayasma
It did not work. This command deleted more lines...
It did not work. This command deleted more lines than i was expecting. Can we check by two columns in file1.txt to be sure it deletes the correct lines? It has to be the exact match not the subset.
2,857
Posted By senayasma
[Solved] delete line from file1 by reading from file2
Hi All,

I have to arrange one of the text file by deleting specific lines.


cat file1.txt

3595 3595 -0.00842773 -0.0085077 0.00368851
12815 12815 -0.00929239 0.00439785 0.0291697 ...
10,185
Posted By senayasma
I am using Notepad++ under Windows to see how the...
I am using Notepad++ under Windows to see how the file looks like.

I tried the code that you suggested


awk '{print NF}' FS= file.txt > output.txt


> Edit with Notepad++ and it still...
10,185
Posted By senayasma
I am using Text editor od -c file.txt >...
I am using Text editor


od -c file.txt > out.txt
cat out.txt

0000000 : s i t e s : 3 1 6 5 \n 1 1 3 0
0000020 2 9 8 1 6 9 6 0 2 0 1 6 9 8
0000040 6 6 1 1 7 1 2 8 9 1 1 8 0 2
0000060 5 4...
10,185
Posted By senayasma
Delete the last empty/blank line of the text file
Hi All,

I have a file.txt which seems like having three lines.


wc -l file.txt

3 file.txt

In fact, once it is open in text editor, this file has four lines where the last line is...
4,924
Posted By senayasma
number of digits after decimal
Hi All,

I have a file of decimal numbers,



cat file1.txt

1.1382666907
1.2603107334
1.6118799297
24.4995857056
494.7632588468
560.7633734425
.....

I want to see the output as...
5,134
Posted By senayasma
Hi Corona688, Yes, you are right i thought...
Hi Corona688,

Yes, you are right i thought that i fixed it but in fact i couldn't.

sed 's/.$/\n/g' file1.txt > out_file1.txt



it replace the last character of the line by the new...
5,134
Posted By senayasma
Ok. I figured it out. sed 's/.$/\n/g'...
Ok. I figured it out.


sed 's/.$/\n/g' file1.txt
sed 's/.$/\n/g' file2.txt
sed 's/.$/\n/g' file3.txt
cat file1.txt file2.txt file3.txt > output.txt


Thanks.
5,134
Posted By senayasma
I think i should add a new line to the end of...
I think i should add a new line to the end of each file1.txt file2.txt and file3.txt. Then cat command can work? How can i add a new line to the end of the line of each files?

Thanks
5,134
Posted By senayasma
Combine the lines from separate text files
Hi All,

I have three separate text files which has only one line and i want to combine these lines in one text file which will have three lines.


cat file1.txt

abc


cat file2.txt
...
950
Posted By senayasma
Create different txt files per line
Hi All,

I have a text file1.txt which looks like

a9
a3
a4
...

and i want to create a seperate .txt files per each line. For example,

output1.txt will have only one element "a9"
...
3,861
Posted By senayasma
math calculation for a txt file
Hi All,

I have a text file which is only one column. I want to multiply all these values in file1.txt by 0.01 and get the output.txt
file1.txt

65
85
90
...

output.txt

0.65
0.85...
2,052
Posted By senayasma
yes this is correct.
yes this is correct.
2,052
Posted By senayasma
An algorithm to be written in linux command
Hi All,

I wrote the following script in R. However, i can not run it. Because the data file is so big. Therefore, i need to write it in shell script. Could you please help me?
...
1,742
Posted By senayasma
i am using bash. Anyways, I figured it out. It...
i am using bash. Anyways, I figured it out. It has to be

for i in 1 2 3 4 5
do
awk '$1==${i}' file1.txt|awk '{print $2}'> file${i}_study.txt
done
1,742
Posted By senayasma
awk syntax error
Hi All,

I wrote a simple script.sh program

for i in seq (22)
do awk '$1==${i}' file1.txt|awk '{print $2}'> file${i}_study.txt
done

and then run it

%bash
%chmod +x script.sh
%...
1,716
Posted By senayasma
Is there any other way to do this without using...
Is there any other way to do this without using nawk command. Because it gives me "nawk: command is not found"?
Showing results 1 to 25 of 37

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