summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
Diffstat (limited to 'bin')
-rwxr-xr-xbin/common/hextorgb7
1 files changed, 3 insertions, 4 deletions
diff --git a/bin/common/hextorgb b/bin/common/hextorgb
index e70040e..63fcbbc 100755
--- a/bin/common/hextorgb
+++ b/bin/common/hextorgb
@@ -1,8 +1,7 @@
#!/usr/bin/env sh
-cat /dev/stdin |
- tr -d '#' |
+tr -d '#' |
tr '[:lower:]' '[:upper:]' |
- sed -r 's/([0-9A-F]{2})/1n/g ; i ibase=16' |
+ sed 's/\([0-9A-F]\{2\}\)/\1\n/g;iibase=16' |
bc |
- tr 'n' ',' |
+ tr '\n' ',' |
sed 's/.$// ; s/.*/rgb(&)/'