Search Results

Search: Posts Made By: binlib
6,749
Posted By radoulov
One way with recent bash versions: $ a1=( a...
One way with recent bash versions:

$ a1=( a b c d ) a2=( c d e f )
$ declare -p a1 a2
declare -a a1='([0]="a" [1]="b" [2]="c" [3]="d")'
declare -a a2='([0]="c" [1]="d" [2]="e" [3]="f")'
$...
17,139
Posted By Chubler_XL
Another idea if your shuf supports...
Another idea if your shuf supports --random-source

$ dd if=/dev/random of=myrand count=1024

$ shuf --random-source=myrand file1
one
three
five
four
two

$ shuf --random-source=myrand...
2,258
Posted By alister
I agree that it's a nice solution. However, if...
I agree that it's a nice solution. However, if the first file's content is as advertised (comma-delimited numbers), there's really no need to specify an alternate delimiter; the default \t suffices....
9,787
Posted By Perderabo
Some process must write the file. Rewrite the...
Some process must write the file. Rewrite the process to omit the trailing spaces. Or pipe that process through the sed command as the file is written. As for faster, maybe perl: perl -pe 's/...
2,675
Posted By methyl
Maybe you have files in different subdirectories...
Maybe you have files in different subdirectories but with the same filename.
Try counting your unique names to test this theory.
find /somefolder -type f -size -7M -exec basename {} \; | sort |...
6,147
Posted By kurumi
perldoc -q count perl -00 -ne '$count= () =...
perldoc -q count

perl -00 -ne '$count= () = $_ =~ /\bpattern\b/g;print $count' file
2,309
Posted By drl
Hi. The command msort is in the Debian...
Hi.

The command msort is in the Debian repository. One of its features is:
For each key an arbitrary sort order may be specified. Msort also understands locales.
If not in your repository, see:...
Showing results 1 to 7 of 7

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