Linux Archive

Linux Archive (http://www.linux-archive.org/)
-   CentOS (http://www.linux-archive.org/centos/)
-   -   virtdown script (http://www.linux-archive.org/centos/521589-virtdown-script.html)

Tim Dunphy 05-03-2011 02:39 PM

virtdown script
 
hello list!

I have a small shell script that I wrote that is meant to quickly bring down all of my xen instances in a quick and easy manner. Odd thing is, it does work on the command line. But if I put it into a script this happens:


[root@LCENT03:/home/bluethundr/bin] #virtdown
>

it expects another command to happen. which is odd since all of the text delimiters (" and ') are balanced according to vim. I was wondering if I could have an opinion on why this might be happening. Here's the script:



#/bin/bash

for i in $(virsh list | grep -v -e Id -e --- -e Domain-0 | awk '{print $1}');
do
/usr/bin/virsh shutdown $i
done


thanks in advance!
tim
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


All times are GMT. The time now is 09:11 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.