Il risultato è quello desiderato; dopo un po 'di prove ed errori. Non capisco cosa siano "2: -" e "3: -" do/mean. Qualcuno può spiegare.Cosa significa "due punti": in bash
#!/bin/bash
pid=$(ps -ef | grep java | awk ' NR ==1 {print $2}')
count=${2:-30} # defaults to 30 times
delay=${3:-10} # defaults to 10 second
mkdir $(date +"%y%m%d")
folder=$(date +"%y%m%d")
while [ $count -gt 0 ]
do
jstack $pid >./"$folder"/jstack.$(date +%H%M%S.%N)
sleep $delay
let count--
echo -n "."
done
Grazie
Stelios
http://tldp.org/LDP/abs/html/string-manipulation.html cercate '$ {stringa: posizione: lunghezza}' –
Non si ottiene Marc B –
Questa domanda è più utile in quanto Google non cerca: - –