Đừng copy bác ơi

curl -s
http://rss.accuweather.com/rss/liveweather_rss.asp\?metric\=${METRIC}\&locCode\=$1
<http://rss.accuweather.com/rss/liveweather_rss.asp/?metric\=${METRIC}\&locCode\=$1>
|
perl -ne ‘if (/Currently/) {chomp;/\<title\>Currently: (.*)?\<\/title\>/;
print “$1″; }’

Bác để ý dấu các chỗ cháu tô màu đỏ, nếu bác copy ra nó ra cái ký tự khác
đó, thành ra chạy không được, bác xóa đi sửa lại đúng dấu nháy đơn, nháy
kép là được

1. Trước if có 1 cái nháy đơn

2. Đoạn cuối, chỗ print có 2 cái nháy kép và cái nháy đơn cuối cùng,

mà cháu thử, ko có kể quả gì cả D:


2014-06-29 20:42 GMT+07:00 maikhai <mkh...@gmail.com>:

> [root@cobh abache]# curl -s
> http://rss.accuweather.com/rss/liveweather_rss.asp\?metric\=${METRIC}\&locCode\=$1
> | perl -ne ‘if (/Currently/) {chomp;/\<title\>Currently: (.*)?\<\/title\>/;
> print “$1″; }’
> bash: syntax error near unexpected token `('
>
>
> Đoạn output trên đây là mình chạy thử dòng lệnh đặt trong weather.sh,
> nhưng bị báo lỗi.
> Bạn nào rảnh giảng cho mình hiểu phải sửa thế nào?
> Cam on.
>
> --
> List's uri: https://groups.google.com/group/archlinuxvn
> List's rules: http://archlinuxvn.org/vn/lists/
> ---
> You received this message because you are subscribed to the Google Groups
> "ArchLinux for Vietnamese" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to archlinuxvn...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/archlinuxvn/ad77cb6e-d2e8-47df-9f0d-9c7aee545595%40googlegroups.com
> .
>

Trả lời cho