enr00
Routinier
Ich lese gerade die Linuxfibel, und stosse häufig auf Kombinationen wie '%i', meine Frage: was heisst und bedeutet das '%'?
Folge dem Video um zu sehen, wie unsere Website als Web-App auf dem Startbildschirm installiert werden kann.
Anmerkung: Diese Funktion erfordert derzeit den Zugriff auf die Seite über den integrierten Safari-Browser.
for i in $(ls *.bat); do cp $i ${i%.*}.bak; done
user@sonne> printf "Zeichenkette: %8s Zahl %d\n" test 42
Zeichenkette: test Zahl 42
user@sonne> printf "Zeichenkette:\t%8s\tZahl %d\n" test 42
Zeichenkette: test Zahl 42
user@sonne> printf "Zeichenkette:\t%-8s\tZahl %3.1E\n" test 42
Zeichenkette: test Zahl 4,2E+0
${parameter%word}
${parameter%%word}
The word is expanded to produce a pattern just as in pathname expansion. If the pattern matches a trail‐
ing portion of the expanded value of parameter, then the result of the expansion is the expanded value of
parameter with the shortest matching pattern (the ‘‘%’’ case) or the longest matching pattern (the ‘‘%%’’
case) deleted. If parameter is @ or *, the pattern removal operation is applied to each positional param‐
eter in turn, and the expansion is the resultant list. If parameter is an array variable subscripted with
@ or *, the pattern removal operation is applied to each member of the array in turn, and the expansion is
the resultant list.
Dann lies dir das nochmal komplett durch.Sorry, aber diesen Ausschnitt habe ich nicht wirklich verstanden...