Search Results

Search: Posts Made By: mira
926
Posted By mira
Thanks a lot! Corona and Junior-helper for...
Thanks a lot! Corona and Junior-helper for explanation. :)
926
Posted By mira
Thanks a lot Corona! It works perfect :). It...
Thanks a lot Corona! It works perfect :). It would be great if you can briefly explain the code.

Thanks again for your help.
926
Posted By mira
Modify blocks of text by printing missing columns
Hi Experts,

I have a problem where I want to print missing columns (3,4) within a block of text. Each block is separated by "###". Some rows have missing column 3 and 4 which should be same as the...
3,234
Posted By mira
Yes, its working perfect now :) Thanks a lot! ...
Yes, its working perfect now :) Thanks a lot!
Awk programming is great for file processing and simpler than other languages but the versions and flavours cause trouble sometimes and it becomes hard...
3,234
Posted By mira
I am on Debian GNU/Linux 5.0.8 (lenny). What...
I am on Debian GNU/Linux 5.0.8 (lenny). What platform are you using?

---------- Post updated at 03:53 PM ---------- Previous update was at 07:52 AM ----------

I observed a strange change as...
3,234
Posted By mira
Thank you so much Shamrock. Your idea is really...
Thank you so much Shamrock. Your idea is really simple and easy to understand. And the usage of function gsub is also great, I was not aware of it before.

But, there is a small problem in the...
3,234
Posted By mira
Thanks DGPickett for your suggestions. I tried...
Thanks DGPickett for your suggestions. I tried something with perl, comparing 2 arrays in some way but it didn't work.

Please help with other suggestions.
12,436
Posted By mira
do you want to add .DAT to all file names and...
do you want to add .DAT to all file names and remove all other dots?

your first example was showing that all your files are ending with .dat and you wish you remove all dots other than the one...
12,436
Posted By mira
rename 's/\.//' *.dat rename 's/dat/\.dat/'...
rename 's/\.//' *.dat

rename 's/dat/\.dat/' *dat
13,989
Posted By mira
you can simply do a numeric sort on second column...
you can simply do a numeric sort on second column of your file and then your lines are arranged in required order.
3,234
Posted By mira
matching group of words
Hi,

I am stuck with a problem, will be thankful for your guidance and help.

I have two files. Each line is a group of words with first word as group Id. eg. 'gp1' in File1 and 'grp1' in...
1,773
Posted By mira
Hi Franklin, I am curious to know what does...
Hi Franklin,

I am curious to know what does this '##*' mean in this regular expression?

Thanks!
5,091
Posted By mira
print number of words in each line
Hi,

Please suggest a way to print number of words in the end of each line.

<input file>


red aunt house
blue sky
bat and ball game


<output file>


red aunt house 3
blue...
1,825
Posted By mira
Comparing lines of two different files
Hello,

Please help me with this problem if you have a solution.

I have two files:
<file1> : In each line, first word is an Id and then other words that belong to this Id

piMN-1 abc pqr...
1,540
Posted By mira
so, in that case: cat *0419*dumb.csv >...
so, in that case:


cat *0419*dumb.csv > today_file_dumb.csv
1,540
Posted By mira
what do you really mean by MMDD* and where is...
what do you really mean by MMDD* and where is this in your filename?

with the given example you can also do it like :

cat *dumb.csv >today_file_dumb.csv

and

cat *test.csv...
4,418
Posted By mira
ok, lets say if I need 2 random columns it can be...
ok, lets say if I need 2 random columns it can be any two e.g.


1,6 1,10
2,6 2,10
3,6 3,10
4,6 4,10


and if I say I need 3 random columns, it can be any three, but what is important...
4,418
Posted By mira
Thanks for your reply ahamed but I need to...
Thanks for your reply ahamed but I need to extract random columns like if I say I want to extract 50 random columns it should extract it randomly from all the columns, lets say it extracts the column...
1,249
Posted By mira
Assuming the Input file has the order: ...
Assuming the Input file has the order:

Age|Name|Sal|Comm


awk -F "|" 'BEGIN {OFS = FS} {print $2,$1,$3,$4}' file1.txt

will give output in order : Name|Age|Sal|Comm

You can always...
2,571
Posted By mira
Thanks a lot mirni for such a nice explanation....
Thanks a lot mirni for such a nice explanation. If I have understood clearly then first it checks if $1 is there or not, in a way to check when it reaches end of file. But, I am not clear what is the...
4,418
Posted By mira
Hey! may be I was not very clear. I wanted to...
Hey! may be I was not very clear. I wanted to extract 'n' random columns where 'n' can be 250 or 400 or any other number. And the file has thousands of columns (lets say 5000) and hundreds of rows...
4,418
Posted By mira
how to choose random columns
Hello!

Can anybody suggest about the fastest way of extracting "n" random columns from a very large file (tab separated) having thousands of columns, where n can be any specified number.
...
2,571
Posted By mira
Thanks! vgersh for your post, its working fine...
Thanks! vgersh for your post, its working fine but it is not displaying the new headings of the columns which are the values of second col of the input file.

I'll be grateful to you if you can...
2,571
Posted By mira
convert columns into rows with respect to first column
Hello All,

Please help me with this file.

My input file (Tab separated) is like:


Abc-01 pc1 -0.69
Abc-01 E2cR 0.459666666666667
Abc-01 5ez.2 1.2265625
Xyz-01 pc1...
Showing results 1 to 24 of 24

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