Question : How to convert MSDOS Batch file to Linux Bash ?

Hi,

May i know how to convert the following MSDOS Batch File to linux BASH Script ?

@echo off
for /F "skip=3 usebackq tokens=*" %%i in (`cmd /c "vzlist -ao veid"`) do (cmd /c "vzbackup "%%i && echo VE ID %%i has been backed up!)

Hope anybody can help.

Thanks.


Answer : How to convert MSDOS Batch file to Linux Bash ?

#!/bin/bash

for i in $(vzlist -ao veid | more +4)
do
      vzbackup $i && echo "VE ID $i has been backed up!"
done
Random Solutions  
 
programming4us programming4us