vendredi 24 juin 2016
How do I store the grepped result to variable if the result has multiple lines
I have a command in my script that goes like this
MESSAGE=`grep -Po 'MSG.K[ws,.''',.:]*' < $LINE`
Now when this command is run I have an output which look like this
Kohl's EDI will be down for scheduled maintenance starting at 12:30 am until
approximately 4:00 am central time on Wednesday June 22nd. Kohl's will not be
able to send or receive EDI or AS2 transmissions during this time. If your
company's AS2 software has an automated process to resend a file after a
failure, Kohl's encourages your company to enable the resend process. This is
also a reminder for AS2 trading partners that Kohl's AS2 certificate will be
changing at 11:00 am central time on Tuesday June 21st.
Now after grepping the whole thing out I would pass the result of the command to a variable that will be used so that I can store the result to a mysql database
The question is How will I do it?
Inscription à :
Publier les commentaires (Atom)
Aucun commentaire:
Enregistrer un commentaire