Difference between
modified post ed8aa by Anonymous on Wed 31st Jan 2024 13:43
original post bd6e6e by Anonymous on Wed 31st Jan 2024 03:05
Download diff
Show
old version |
new version |
both versions
| 1 | 1 | #!/bin/ksh93 | |
| 2 | 2 | ||
| 3 | 3 | # | |
| 4 | - | # nfsurl.ksh - convert host/port/path from/to a nfs://-URL | |
| 4 | + | # MIT License | |
| 5 | 5 | # | |
| 6 | - | # Written by Roland Mainz <roland.mainz@nrubsig.org> | |
| 6 | + | # Copyright (c) 2024 Roland Mainz <roland.mainz@nrubsig.org> | |
| 7 | 7 | # | |
| 8 | - | ||
| 8 | + | # Permission is hereby granted, free of charge, to any person obtaining a copy | |
| 9 | - | function urlencodestr | |
| 9 | + | # of this software and associated documentation files (the "Software"), to deal | |
| 10 | - | { | |
| 10 | + | # in the Software without restriction, including without limitation the rights | |
| 11 | - | set -o nounset | |
| 11 | + | # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
| 12 | - | ||
| 12 | + | # copies of the Software, and to permit persons to whom the Software is | |
| 13 | - | nameref out_encodedstr=$1 | |
| 13 | + | # furnished to do so, subject to the following conditions: | |
| 19 | 14 | # | |
| 20 | - | # URLs are encoded in UTF-8 on byte-level, while shells | |
| 15 | + | # The above copyright notice and this permission notice shall be included in all | |
| 21 | - | # operate on characters (which might be multibyte, and | |
| 16 | + | # copies or substantial portions of the Software. | |
| 29 | 17 | # | |
| 30 | - | printf '%s' "$in_str" | \ | |
| 18 | + | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | |
| 31 | - | iconv -t 'UTF-8' | \ | |
| 19 | + | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | |
| 32 | - | od -t x1 -w1 -v | \ | |
| 20 | + | # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | |
| 33 | - | while read dummy ch_hexval ; do | |
| 21 | + | # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | |
| 34 | - | [[ "$ch_hexval" != '' ]] || break | |
| 22 | + | # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | |
| 23 | + | # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | |
| 35 | 26 | ||
| 27 | + | # |
Submit a correction or amendment below (click here to make a fresh posting)
After submitting an amendment, you'll be able to view the differences between the old and new posts easily.
nrubsig.kpaste.net RSS