How can I execute this code that is in a .sh

0

I would like to apply to a .xml file what comes within this .sh

#!/bin/bash
perl -p -i -e "s[- <][-      <]g" $1
perl -p -i -e "s[>    ][>      - ]g"  $1
perl -p -i -e "s[,][]g"  $1
perl -p -i -e "s[<Concepto></Concepto>][<Concepto>SUSCRIPCION</Concepto>]g"  $1
perl -p -i -e "s[>   -][>      -]g"  $1
sed -i 's/|//g' $1
sed -i 's/*//g' $1

How could I do this?

    
asked by Bertin Yancarlo Carrillo Corn 31.10.2016 в 20:59
source

1 answer

0

You could redirect the output of the file from the console in this way:

./archivo.sh parametro1 > archivo.xml
    
answered by 31.10.2016 в 22:08