Lines Matching +full:sub +full:- +full:spaces
2 # SPDX-License-Identifier: GPL-2.0
7 {sub(/,$/, "") \
8 sub(/ETHTOOL_LINK_MODE_/,"") \
9 sub(/_BIT/,"") \
10 sub(/_Full/,"/Full") \
11 sub(/_Half/,"/Half");\
20 local out=$(ethtool -s $cmd 2>&1 | wc -l)
29 local -a linkmodes_params
39 local -a dev_linkmodes=($(dev_speeds_get $dev 1 $adver))
41 linkmodes_params[$i]=$(echo -e "${dev_linkmodes[$i]}" | \
42 # Replaces all non numbers with spaces
43 sed -e 's/[^0-9]/ /g' | \
44 # Squeeze spaces in sequence to 1 space
45 tr -s ' ')
47 param_count=$(echo "${linkmodes_params[$i]}" | wc -w)
48 if [[ $param_count -eq 1 ]]; then
50 elif [[ $param_count -ge 3 ]]; then
74 sed -n '/'"$mode"':/,$p' | \
77 sed -n '2,${/^[\t][^ \t]/q};p' | \
79 cut -d':' -f2)
81 local -a speeds_arr=($speeds_str)
82 if [[ $with_mode -eq 0 ]]; then
97 local -a dev1_speeds=($(dev_speeds_get $dev1 $with_mode $adver))
98 local -a dev2_speeds=($(dev_speeds_get $dev2 $with_mode $adver))
100 comm -12 \
101 <(printf '%s\n' "${dev1_speeds[@]}" | sort -u) \
102 <(printf '%s\n' "${dev2_speeds[@]}" | sort -u)
112 local -a speeds_arr