Search Results

Search: Posts Made By: binlib
4,770
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")'
$...
11,033
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...
1,345
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....
6,198
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/...
1,982
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 |...
3,431
Posted By kurumi
perldoc -q count perl -00 -ne '$count= () =...
perldoc -q count

perl -00 -ne '$count= () = $_ =~ /\bpattern\b/g;print $count' file
1,871
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

 

Featured Tech Videos

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