]> git.ipfire.org Git - people/arne_f/network.git/commitdiff
network: Faster implementation of seq and lowercase.
authorMichael Tremer <michael.tremer@ipfire.org>
Sat, 19 Jun 2010 13:13:39 +0000 (15:13 +0200)
committerMichael Tremer <michael.tremer@ipfire.org>
Sat, 19 Jun 2010 13:13:39 +0000 (15:13 +0200)
functions.util

index c7385416cd96dd5d8403138fda2c6b134a99dd5f..8705726ca1b557f0b919a5112309c8c29121ba55 100644 (file)
@@ -236,6 +236,20 @@ function uppercase() {
        echo "${input^^}"
 }
 
+function lowercase() {
+       local input
+       read input
+       echo "${input,,}"
+}
+
+function seq() {
+       if [ $# -eq 2 ]; then
+               eval echo {${1}..${2}}
+       elif [ $# -eq 3 ]; then
+               eval echo {${1}..${3}..${2}}
+       fi
+}
+
 function beautify_time() {
        local value=${1}