Search Results

Search: Posts Made By: dietmar13
1,305
Posted By Scrutinizer
@OP: You are not using a next statement and it...
@OP: You are not using a next statement and it seems you have the two files reversed and this: /'"$name"'/ uses a shell variable "$name".

Alternatively try:
awk 'NR==FNR{for(i=2; i<=NF; i++)...
1,305
Posted By Akshay Hegde
Try $ cat file1 novelMiR_892 ...
Try


$ cat file1
novelMiR_892 novelMiR_891,
novelMiR_852
novelMiR_893
novelMiR_1661
novelMiR_854
novelMiR_1210
novelMiR_1251
novelMiR_855
novelMiR_1252 ...
2,609
Posted By Subbeh
You could try somehting like this: awk...
You could try somehting like this:
awk 'BEGIN{n=4; s="1,2,"n-1; split(s,a,","); for (i in a) print a[i]}'
2,609
Posted By RudiC
Maybe not quite what you need, but at least...
Maybe not quite what you need, but at least pointing in the desired direction:awk '{for (i=n-2; i<=n+1; i++) print i%n+1} ' n=15 file
14
15
1
2

A little sort might help...
2,609
Posted By alister
Put the values in an array and to iterate in...
Put the values in an array and to iterate in order use a for loop with an index variable.

Regards,
Alister
1,452
Posted By Scrutinizer
x is an empty string, so "" F contains the...
x is an empty string, so ""
F contains the indexes after the split of the header, an n would be the number..

You could solve the header with something like this, but that would still leave the...
2,967
Posted By jim mcnamara
what happens if the number of filenames in the...
what happens if the number of filenames in the list are not evenly divisible by 4?

Try this:

cnt=1
for fname in *
do
dosomecommand $fname &
cnt=$(( cnt + 1 ))
[ $(( $cnt % 4...
2,247
Posted By Don Cragun
Please look again at the script I suggested in my...
Please look again at the script I suggested in my last post in this thread. It got rid of the trailing tabs. The spots marked in red above are the areas that need to change to get rid of trailing...
2,247
Posted By RudiC
This proposal makes use of the fact that we're...
This proposal makes use of the fact that we're dealing with a symmetrical matrix, needing to retain only the upper triangular matrix. A sorting step would be much easier to implement, and only half...
Showing results 1 to 9 of 9

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