mirror of
https://github.com/linux-apfs/apfstests.git
synced 2026-05-01 15:01:44 -07:00
f3e65e9150
Scripted conversion, see script in initial SPDX license commit message. Many files required touch-ups after the script had run because of the old and widely different formats. most touchups were to remove excess empty comment lines the script left behind. Signed-off-by: Dave Chinner <dchinner@redhat.com>
25 lines
447 B
Awk
25 lines
447 B
Awk
# SPDX-License-Identifier: GPL-2.0
|
|
# Copyright (c) 2005 Silicon Graphics, Inc. All Rights Reserved.
|
|
#
|
|
# randomize stdin.
|
|
|
|
function randomize(array, N) {
|
|
for(i = 0; i < N; i++) {
|
|
j = int(rand()*N)
|
|
if ( i != j) {
|
|
tmp = array[i]
|
|
array[i] = array[j]
|
|
array[j] = tmp
|
|
}
|
|
}
|
|
return
|
|
}
|
|
|
|
{
|
|
srand()
|
|
for (i = 0; i < NF; i++ ) array[i] = $(i+1)
|
|
randomize(array, NF)
|
|
for (i = 0; i < NF; i++) printf("%s ", array[i])
|
|
}
|
|
|