Created
August 5, 2014 15:52
-
-
Save kaneshin/ab742ceacabd63c6d765 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# File: ex.sh | |
# Maintainer: Shintaro Kaneko <kaneshin0120@gmail.com> | |
# Last Change: 06-Aug-2014. | |
# Usage: | |
# bash ex.sh strings.xml strings_foo.xml strings_bar.xml strings_baz.xml strings_qux.xml > result.csv | |
list=$@ | |
for var in $list | |
do | |
echo "`cat $var | awk '{sub("^ *", ""); print $0}' | awk '{sub("<\\/string>", ""); print $0}' | awk '{sub("^<.*>", ""); print $0}' | awk 'NF > 0 {print $0","}'`" | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment