Search Results

Search: Posts Made By: Marti95
13,769
Posted By RudiC
Hmmm - I missed to post the necessary IFS...
Hmmm - I missed to post the necessary IFS modification. Try again with this slightly modified version:
IFS=$'\n'

for IN in $(echo "${!ENTRIES
}" | tr ',' '\n' | sort -un)
do [ !...
5,321
Posted By nezabudka
shuf -e ${!ENTRIES[@]} | sort -t, -k1,1n...
shuf -e ${!ENTRIES[@]} | sort -t, -k1,1n -k2,2.2Vr |

--- Post updated at 14:02 ---

And so it works
sort -t, -k1,1n -k2,2.2r
5,321
Posted By RudiC
Try paste: echo "${!ENTRIES }" | sort -t,...
Try paste:
echo "${!ENTRIES
}" | sort -t, -k1,1n -k2,2.2r -k2.3 | while read IX; do printf "%s\n" ${ENTRIES[$IX]}; done | paste -sd"\t\t\t\n"
111.122.133.20 unas15533 unas # UNAS...
5,321
Posted By RudiC
Did you set the IFS variable as indicated? Try...
Did you set the IFS variable as indicated?
Try the sort keys given with netzabudka's proposal as well.
5,321
Posted By nezabudka
shuf -e ${!ENTRIES[@]} | sort -V | while read d;...
shuf -e ${!ENTRIES[@]} | sort -V | while read d; do echo $d=${ENTRIES[$d]}; done

--- Post updated at 12:01 ---

can play with the options of the "sort" command :)
Showing results 1 to 5 of 5

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