mirror of
https://github.com/gyurix1968/guacamole-client.git
synced 2025-09-06 05:07:41 +00:00
GUACAMOLE-1298: Avoid POSIX character classes for compatibility with mawk.
This commit is contained in:
@@ -260,8 +260,8 @@ trim_file() {
|
|||||||
FILENAME="$1"
|
FILENAME="$1"
|
||||||
|
|
||||||
# Find line number of first and last non-blank lines
|
# Find line number of first and last non-blank lines
|
||||||
FIRST_LINE="`awk '/[^[:space:]]/ {print NR; exit}' "$FILENAME"`"
|
FIRST_LINE="`awk '/[^\t ]/ {print NR; exit}' "$FILENAME"`"
|
||||||
LAST_LINE="`awk '/[^[:space:]]/ {last=NR} END {print last}' "$FILENAME"`"
|
LAST_LINE="`awk '/[^\t ]/ {last=NR} END {print last}' "$FILENAME"`"
|
||||||
|
|
||||||
# Print the contents of the file between those lines, inclusive
|
# Print the contents of the file between those lines, inclusive
|
||||||
awk "NR==$FIRST_LINE,NR==$LAST_LINE" "$FILENAME"
|
awk "NR==$FIRST_LINE,NR==$LAST_LINE" "$FILENAME"
|
||||||
|
Reference in New Issue
Block a user