Search Results

Search: Posts Made By: cwzkevin
1,850
Posted By cwzkevin
it is beautiful, thank you!
it is beautiful, thank you!
1,850
Posted By cwzkevin
Thank you so much. They all work! Really...
Thank you so much. They all work! Really appreciate all the helps!

I really need to learn more about regular expressions...
1,850
Posted By cwzkevin
Help with changing text file layout
Hi there,
I am with this one column input text file to change layout, please help. Thanks. I have awk, sed.

$ cat input

Median
1.0
2.3
3.0

Median
35.0
26.3
45.7
10.1
63.1

Median...
2,126
Posted By cwzkevin
Thanks, Rudi. I got all my solutions now. Thank...
Thanks, Rudi. I got all my solutions now. Thank you!
2,126
Posted By cwzkevin
Thank you, Rudi. I think Pamu's solution...
Thank you, Rudi.

I think Pamu's solution works. (Thank you Pamu.)
2,126
Posted By cwzkevin
Yes, transpose it and use awk with NF=22,...
Yes, transpose it and use awk with NF=22, NR=3278824 is the direction of solution in my mind. Actually, pamu's solution is done by transpose it with awk and also count it by awk!!! GREAT!
2,126
Posted By cwzkevin
3405 The attach is the first 8192 chars of the...
3405
The attach is the first 8192 chars of the first 4 lines. I just need to test the script you provided through and through.
2,126
Posted By cwzkevin
Thanks, your code works on my example. But it...
Thanks, your code works on my example. But it outputs the matching char one at a line. I need to do something like | tr -d '\n' to remove the newline of every line to get it to print out onto one...
2,126
Posted By cwzkevin
Thanks! My bad! The example I have up there is...
Thanks!
My bad! The example I have up there is just for example. The matching actually has no pattern at all. I don't know where the matching(s) is/are happening and I don't know how many of them...
2,126
Posted By cwzkevin
Find out match characters on all lines
I have a file with 22 lines. Each line has only 5 different chars, no white space, and each line is 3,278,824 in length. The 5 chars is "-", "A", "B", "C", "D".
Below is an example of the first 25...
1,422
Posted By cwzkevin
I have a starting partial solution: awk...
I have a starting partial solution:

awk 'min[$4]=="" || $2<min[$4] {min[$4]=$2;lines[$4]=$1" "$2}END{for (j in lines) print j"\t"lines[j]}' inputfile
-------------------------------------
"abc" ...
2,508
Posted By cwzkevin
You are right. I didn't assume different...
You are right. I didn't assume different scenarios.
2,508
Posted By cwzkevin
VirtualBox:~/Desktop$ sort -t$'\t' -k2,2 temp.txt...
VirtualBox:~/Desktop$ sort -t$'\t' -k2,2 temp.txt
inode=3512 size=103334 fd=2
inode=3513 size=139474 fd=1
inode=3513 size=139474 fd=2
inode=3513 ...
2,139
Posted By cwzkevin
Thanks, Jim There might be a typo, but the...
Thanks, Jim
There might be a typo, but the follow code works:

while read line; do
declare -a arr=($line)

start=${arr[4]}
end=${arr[5]}
id=${arr[[10]}
...
done < inputfile
2,139
Posted By cwzkevin
Sorry, this is not what I want. I need the...
Sorry, this is not what I want.
I need the values of current line be assigned to variables, work with these variables before next line, and so on...
I will edit my post to make it clear. Sorry for...
2,139
Posted By cwzkevin
Help to process line by line and assign value to variables
Hi, there
I have a file with tab and space as field separator. I need to assign values to variables then work with them, line by line. The code I wrote only works when each line has only one word....
Showing results 1 to 16 of 16

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