ancadmihai
Technical User
hello
i have this script (script_exp)
#!/bin/bash
echo " 2007-04-25 " >> expirati.txt
awk -F"," '{if ($26=="2007-04-25") print $1,$18,$19,$21,$23,$26}' SDP1.DUMP_subscriber.csv_200704252330_2000 >>expirati.txt
awk -F"," '{if ($26=="2007-04-25") print $1}' SDP1.DUMP_subscriber.csv_200704252330_2000 > expired20070425.txt
i need to do something like this
./script_exp var1 var2
i tried many versions of this script (including the tips from but with no good results.the last version looks like this:
#!/bin/ksh
echo "data"
read VAR
awk -v var="$VAR" -F"," '($26=="$VAR") {print $1,$18,$19,$21,$23,$26}' SDP1.DUMP_subscriber.csv_${1}2330_2000 >>ti.txt"
but i had the following error "awk: syntax error near line 1
awk: bailing out near line 1"
PLEEEASSEEEE help me out.. i can't seem to get my head around this awk and it's way of dealing with "$
i have this script (script_exp)
#!/bin/bash
echo " 2007-04-25 " >> expirati.txt
awk -F"," '{if ($26=="2007-04-25") print $1,$18,$19,$21,$23,$26}' SDP1.DUMP_subscriber.csv_200704252330_2000 >>expirati.txt
awk -F"," '{if ($26=="2007-04-25") print $1}' SDP1.DUMP_subscriber.csv_200704252330_2000 > expired20070425.txt
i need to do something like this
./script_exp var1 var2
i tried many versions of this script (including the tips from but with no good results.the last version looks like this:
#!/bin/ksh
echo "data"
read VAR
awk -v var="$VAR" -F"," '($26=="$VAR") {print $1,$18,$19,$21,$23,$26}' SDP1.DUMP_subscriber.csv_${1}2330_2000 >>ti.txt"
but i had the following error "awk: syntax error near line 1
awk: bailing out near line 1"
PLEEEASSEEEE help me out.. i can't seem to get my head around this awk and it's way of dealing with "$