/tmp$ cat test.awk
{
P=$3
PS=sprintf("%.2f", P)
for (i = 1; i <= NF; ++i) {
if (i != 1) printf FS
if (i != 3) { printf $i } else { printf PS }
}
printf "\n"
}
/tmp$ cat test.txt | awk -f test.awk -F,
09/28/2009,09:10:37,35.60,35.29,35.75,150
09/28/2009,09:30:06,35.48,35.34,35.64,14900
09/28/2009,09:30:06,35.49,35.37,35.61,100
09/28/2009,09:30:10,35.40,35.4,35.57,100
09/28/2009,09:30:10,35.48,35.43,35.53,200
09/28/2009,09:30:11,35.46,35.44,35.56,200
09/28/2009,09:30:14,35.57,35.49,35.57,100
function notify_if_long() {
start=$(date +%s);
eval "$@";
end=$(date +%s);
elaps=$(( $end - $start ));
if [[ $elaps > 10 ]]; # или сколько там секунд тебе надо
then
echo -en "\007"; #тут любой из предложенных способов натификации
fi;
}
. $HOME/.bashrc #или .zshrc если его используешь
и все у тебя будет➜ ~ alias
-='cd -'
..='cd ..'
...='cd ../..'
1='cd -'
2='cd -2'
3='cd -3'
4='cd -4'
5='cd -5'
6='cd -6'
7='cd -7'
8='cd -8'
9='cd -9'
➜ ~ cat test.sh
#!/usr/bin/env zsh
. $HOME/.zshrc
Al=$(alias)
echo $Al
➜ ~ ./test.sh
-='cd -'
..='cd ..'
...='cd ../..'
1='cd -'
2='cd -2'
3='cd -3'
4='cd -4'
5='cd -5'
6='cd -6'
7='cd -7'
8='cd -8'
9='cd -9'