Skip to content

Instantly share code, notes, and snippets.

@sipadan2003
Created December 18, 2019 13:40
Show Gist options
  • Save sipadan2003/bc68b261873e21f7300154f41e19a279 to your computer and use it in GitHub Desktop.
Save sipadan2003/bc68b261873e21f7300154f41e19a279 to your computer and use it in GitHub Desktop.
#!/bin/bash
reem003(){
local input1=$1
local output=$2
rm -f $output
cat $input1 | while read line
do
local k=`echo "$line" | sed -e "s/[<>-][0-9\.]\+/-99999.9/g"`
echo $k >> $output
done
}
reem003 tameshi.txt output.txt
@sipadan2003
Copy link
Author

次の1行だけでできる!

sed -e "s/[<>-][0-9.]+/-99999.9/g" tameshi.txt > output.txt

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment