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 | |
awk -f reem010.awk b.csv | |
awk -f temp.awk b.csv > b1.csv | |
head -n1 a.csv > b2.csv | |
cat b1.csv >> b2.csv | |
awk -f reem010.awk c.csv | |
awk -f temp.awk c.csv > c1.csv | |
head -n1 a.csv > c2.csv | |
cat c1.csv >> c2.csv |
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
BEGIN { FS="\t" } | |
{ | |
for (i=2;i<=NF;i++){ | |
if(i == NF){ | |
printf "%s\n", replaceToDummy($i) | |
} else { | |
printf "%s\t", replaceToDummy($i) | |
} | |
} | |
} |
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 | |
printUsage() { | |
echo "Usage: reem006 <input-file> <line-number>" | |
exit 1 | |
} | |
compareArray() { | |
local counter=$1 |
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
BEGIN { FS="\t" } | |
{ | |
if(NR > 1){ | |
if($2!="" && $4!="" && $5!=""){ | |
printf "%d\n", (NR-1) | |
} | |
} | |
} |
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 | |
num2=79 | |
for num1 in `seq 40 60`; do | |
old_name=`printf "a_%03d" $num1` | |
new_name=`printf "a_%03d" $num2` | |
if [ -e ${old_name} ] && [ ! -e ${new_name} ]; then | |
mv ${old_name} ${new_name} | |
fi | |
num2=`expr ${num2} + 1` |
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 | |
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"` |
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 | |
function goCsv { | |
local IFS=, | |
while read row; do | |
local output= | |
columns=($row) | |
for c in "${columns[@]}"; do | |
if [ "${c}" == "" ]; then | |
c="AAA" |
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
import java.awt.Color; | |
import java.awt.Graphics; | |
import java.awt.MediaTracker; | |
import java.awt.image.BufferedImage; | |
import java.io.File; | |
import javax.imageio.ImageIO; | |
import javax.swing.ImageIcon; | |
import javax.swing.filechooser.FileSystemView; |
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 | |
p001(){ | |
local input1=$1 | |
local input2=$2 | |
local output=$3 | |
local pattern="^\([0-9]\+\)[ ]\+\([A-Za-z]\+\)$" | |
declare -A array | |
for i in `grep -E "^[0-9]+[ ]+[A-Za-z]+$" $input2` |
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 | |
for i in `grep -E "^[0-9]+$" d.txt` | |
do | |
echo "Processing for $i" | |
rm -f $i.txt | |
for j in `grep -E "^[^:]+:$i" d.txt` | |
do | |
echo $j >> $i.txt | |
done |
NewerOlder