0 votes

As I run this code this is one .sh

I would like to apply to a file .xml what is coming in 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?

0voto

Genarito Points 1890

You could redirect the output of the file from the consolal this way:

./archivo.sh parametro1 > archivo.xml

HolaDevs.com

HolaDevs is an online community of programmers and software lovers.
You can check other people responses or create a new question if you don't find a solution

Powered by:

X