Search Results

Search: Posts Made By: Marti95
2,847
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 [ !...
472
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
472
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...
472
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.
472
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

 

Featured Tech Videos

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