Process argument file.

Pascal J. Bourguignon [2020-10-28 09:18]
Process argument file.
Filename
iconv-list-encodings
diff --git a/iconv-list-encodings b/iconv-list-encodings
index 253a38a..015dd7c 100644
--- a/iconv-list-encodings
+++ b/iconv-list-encodings
@@ -1,2 +1,3 @@
 #!/bin/bash
-iconv -l|tr -d /|while read e ; do f="$(iconv -f "$e" -t "utf-8" < b 2>/dev/null)" && printf "%-30s %s\n" "$e" "$f" ; done|sort -k 2
+file="$1"
+iconv -l|tr -d /|while read e ; do f="$(iconv -f "$e" -t "utf-8" < "$file" 2>/dev/null)" && printf "%-30s %s\n" "$e" "$f" ; done|sort -k 2
ViewGit