- Registriert
- 11. Feb. 2009
- Beiträge
- 168
- Reaktionspunkte
- 3
- Punkte
- 24
Hier klaut read die führenden Leerzeichen 
output :
Wo liegt (mein) Denkfehler

Rich (BBCode):
#!/opt/bin/bash
who -a > "$$";
echo "file $$:";cat "$$";echo -e "\nlines of $$"
#
while read line ; do
echo ">$line<"
# printf "time: %s who: %s tty: %s\n" "${line:24:39}" "${line:0:12}" "${line:12:23}"
done < "$$"
rm "$$"
echo -e "\n\n\t wo sind die führenden Leerzeichen :-((\n"
output :
Rich (BBCode):
NAS1> ./last.sh
file 16746:
system boot 2015-09-08 19:59
run-level 2 2015-09-08 20:07 last=1
LOGIN console 2015-09-08 20:00 7388 id=sol
pts/1 2015-09-08 20:30 21600 id=ts/1 term=0 exit=0
root + pts/3 2015-10-03 09:00 . 3363 (92.193.111.237)
pts/4 2015-09-29 14:49 24026 id=ts/4 term=0 exit=0
lines of 16746
>system boot 2015-09-08 19:59<
>run-level 2 2015-09-08 20:07 last=1<
>LOGIN console 2015-09-08 20:00 7388 id=sol<
>pts/1 2015-09-08 20:30 21600 id=ts/1 term=0 exit=0<
>root + pts/3 2015-10-03 09:00 . 3363 (92.193.111.237)<
>pts/4 2015-09-29 14:49 24026 id=ts/4 term=0 exit=0<
wo sind die führenden Leerzeichen :-((
Wo liegt (mein) Denkfehler
