From 1b7edbb5ba6498956d4acf877a6eac254fc02bf9 Mon Sep 17 00:00:00 2001 From: Laurent Peuch Date: Mon, 28 Sep 2015 00:59:52 +0200 Subject: [PATCH] [mod] simplify commnad --- scripts/remove | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/scripts/remove b/scripts/remove index c81aa8f..e7f4f81 100644 --- a/scripts/remove +++ b/scripts/remove @@ -4,9 +4,6 @@ final_path=/var/www/noalyss sudo rm -rf $final_path -for i in $(sudo su postgres -c "psql -l | grep \"\\" | awk '{print $1}'") -do - sudo su postgres -c "dropdb $i" -done +sudo su postgres -c "psql -l | grep \"\\" | awk '{print $1}' | xargs -l dropdb" sudo su postgres -c 'dropuser noalyss'