aboutsummaryrefslogtreecommitdiffstats
path: root/systemd/rhel-autorelabel
diff options
context:
space:
mode:
authorMatteo Croce <mcroce@redhat.com>2018-04-10 00:48:11 +0200
committerDee'Kej <deekej@linuxmail.org>2018-05-17 17:47:07 +0200
commitc29fbec03a13d7cfaac46af72aafc44f78902cc4 (patch)
treeb564471b3e638e0f6536e718b185e98855570a07 /systemd/rhel-autorelabel
parent402e41490782fc0549326be1a5d98bfa1f4ce35b (diff)
downloadinitscripts-c29fbec03a13d7cfaac46af72aafc44f78902cc4.tar
initscripts-c29fbec03a13d7cfaac46af72aafc44f78902cc4.tar.gz
initscripts-c29fbec03a13d7cfaac46af72aafc44f78902cc4.tar.bz2
initscripts-c29fbec03a13d7cfaac46af72aafc44f78902cc4.tar.xz
initscripts-c29fbec03a13d7cfaac46af72aafc44f78902cc4.zip
network-functions: use tr to upper case strings rather than awk
network-functions uses awk to tranform the mac address to upper case. Replace awk with tr which is two order of magnitude faster: $ time awk '{ print toupper($0) }' </usr/share/dict/words >/dev/null real 0m0,227s user 0m0,224s sys 0m0,004s $ time tr '[a-z]' '[A-Z]' </usr/share/dict/words >/dev/null real 0m0,005s user 0m0,000s sys 0m0,005s Also use here-strings instead of spawning a subshell and a pipe. Signed-off-by: Matteo Croce <mcroce@redhat.com>
Diffstat (limited to 'systemd/rhel-autorelabel')
0 files changed, 0 insertions, 0 deletions