Search Results

Search: Posts Made By: tasmac
1,537
Posted By tasmac
works fine now
works fine now
1,537
Posted By tasmac
$fulldate=20130430 ...
$fulldate=20130430
bdate=`{$fulldate:0:4}-{$fulldate:4:2}-{$fulldate:6}`
echo $bdate

does not seem to work when I try to assign it as var
1,537
Posted By tasmac
Convert date arg to sql date
Doing a bcp load to sybase and need to convert datearg which comes in as 20130501 to 2013-05-01 which is the best way to do this
1,535
Posted By tasmac
Yes it does . :)
Yes it does . :)
1,535
Posted By tasmac
Spawn and join multiple process
I am doing some file manipulation and then a bcp once all the files are processed. I need to do the following


for all files in dirctory
begin
-Step 1 use another shell/perl to format the...
18,692
Posted By tasmac
@yoda yes thats what I ended up doing thanks
@yoda
yes thats what I ended up doing thanks
18,692
Posted By tasmac
Is there a way to change this so that it does not...
Is there a way to change this so that it does not chnage the same file but writes into a new file instead of changing the same file
perl -pi2 -e 'BEGIN{$rep{chr($_)}=q() for...
18,692
Posted By tasmac
found this with more googling perl -pi2 -e...
found this with more googling

perl -pi2 -e 'BEGIN{$rep{chr($_)}=q() for 0..31,127;$rep{chr(10)}=chr(10)}s/([[:cntrl:]])/$rep{$1}/g'

this seems to work but not sure what this does though :)...
18,692
Posted By tasmac
nope sandbox]$>nawk...
nope

sandbox]$>nawk '{gsub(/[[:cntrl:]]/,x)}1' bin4lines.txt
app_id:1936 pgm_num:0 branch:TBNY ord_num:0500012(QMK) deal_num:0 ref_num:R
app_id:1396 pgm_num:0 branch:TBNY ord_num:0000016(Ì11S)...
18,692
Posted By tasmac
There is some other binary data which is still...
There is some other binary data which is still causing this to file.
When copying to this editor it causes a line break

app_id:1996 pgm_num:0 branch:TBNY ord_num:0440010(
Q6I) deal_number:0
...
18,692
Posted By tasmac
Removing inline binary data from txt file
I am trying to parse a file but the filehas binary data inline mixed with text fields.
I tried the binutils strings function , it get the binary data out but put the char following the binary data...
11,023
Posted By tasmac
tried with nawk and it works ... ----------...
tried with nawk and it works ...

---------- Post updated at 05:54 PM ---------- Previous update was at 05:54 PM ----------

@shamrock

if I use nawk it works. Thx
11,023
Posted By tasmac
$>uname -a SunOS gatxdev2 5.10...
$>uname -a
SunOS gatxdev2 5.10 Generic_147441-19 i86pc i386 i86pc
$>awk 1 /dev/null
awk: syntax error near line 1
awk: bailing out near line 1
$>
Looks like I am using the old awk

according...
11,023
Posted By tasmac
I get a similar error . I am using bash and other...
I get a similar error . I am using bash and other awk commands work

$>awk -F"[a-z_]+([0-9])?:" '{for(i = 1; i <= NF; i++) printf("%s", $i == "" ? $i : $i "" (i == NF ? "\n" : ","))}' in.trade...
11,023
Posted By tasmac
I get the following error when i run the above...
I get the following error when i run the above line

>awk -F'[[:alnum:]]*[_[:alpha:]]+[[:alnum:]]*:' '{$1=$1; sub(OFS,x)}1' OFS=" , " in.trade
awk: syntax error near line 1
awk: illegal statement...
11,023
Posted By tasmac
Parsing line with name:value pairs in shell script
HI ,
I have the following type of lines in a file and need to create a csv file that can be bcp'ed into a db

The problem that I have is the delimited of the <name :value> is a space but some of...
Showing results 1 to 16 of 16

 
All times are GMT -4. The time now is 03:23 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy