我在bash中有一个脚本--从LocLog获取一个来自collumn 8的ip:
#!/bin/bash
for i in $(cat /scripts/logs/LocLog | awk '{print $8}' | sort | uniq);
do
php /scripts/a.php $i;
done脚本给出一个错误:
bash -x log
'og: line 2: syntax error near unexpected token `
'og: line 2: `for i in $(cat /scripts/logs/LocLog | awk '{print $8}' | sort | uniq);有音信吗?
发布于 2013-10-03 04:39:33
去掉for行末尾的分号。
https://stackoverflow.com/questions/19150872
复制相似问题