renommer less1 en lless
This commit is contained in:
parent
e9d52d8f35
commit
9c6e7a8750
4
less1
4
less1
|
@ -1,4 +0,0 @@
|
|||
#!/bin/bash
|
||||
# -*- coding: utf-8 mode: sh -*- vim:sw=4:sts=4:et:ai:si:sta:fenc=utf-8
|
||||
|
||||
iconv -f latin1 -t utf-8 "$@" | less -S -R -E
|
|
@ -0,0 +1,31 @@
|
|||
#!/bin/bash
|
||||
# -*- coding: utf-8 mode: sh -*- vim:sw=4:sts=4:et:ai:si:sta:fenc=utf-8
|
||||
source "$(dirname "$0")/lib/ulib/auto" || exit 1
|
||||
|
||||
function display_help() {
|
||||
uecho "$scriptname: frontend de less pour lire des fichiers encodés en latin1
|
||||
|
||||
USAGE
|
||||
$scriptname [options] files...
|
||||
|
||||
OPTIONS
|
||||
-S, --chop-long-lines
|
||||
-r, --raw-control-chars
|
||||
-R, --RAW-CONTROL-CHARS
|
||||
-e, --quit-at-eof
|
||||
-E, --QUIT-AT-EOF
|
||||
options de less qui sont reportées telles quelles"
|
||||
}
|
||||
|
||||
lessopts=()
|
||||
args=(
|
||||
--help '$exit_with display_help'
|
||||
-S,--chop-long-lines '$lessopts+=(-S)'
|
||||
-r,--raw-control-chars '$lessopts+=(-r)'
|
||||
-R,--RAW-CONTROL-CHARS '$lessopts+=(-R)'
|
||||
-e,--quit-at-eof '$lessopts+=(-e)'
|
||||
-E,--QUIT-AT-EOF '$lessopts+=(-E)'
|
||||
)
|
||||
parse_args "$@"; set -- "${args[@]}"
|
||||
|
||||
iconv -f latin1 -t utf-8 "$@" | less "${lessopts[@]}"
|
Loading…
Reference in New Issue