Search Results

Search: Posts Made By: wincrazy
2,351
Posted By wincrazy
Worked like charm. Can you pls explain the...
Worked like charm. Can you pls explain the expression?
2,351
Posted By wincrazy
One more question. if I need the output of each...
One more question. if I need the output of each file in one line without the tag "HDR" what do I need to do?
For example the output needs to be

1234 abc qwertyabc def ghi jkl
2,351
Posted By wincrazy
Can you please explain the logic. Where do you...
Can you please explain the logic. Where do you have the tag "HDR" as part of the delimiter?
2,351
Posted By wincrazy
Script for splitting file of records into multiple files
Hello I have a file of following format

HDR 1234 abc qwerty
abc def ghi jkl

HDR 4567 xyz qwerty
abc def ghi jkl

HDR 890 mno qwerty
abc def ghi jkl

HDR 1234 abc qwerty
abc def ghi jkl...
1,739
Posted By wincrazy
Could you please explain what the script at 1...
Could you please explain what the script at 1 thru 4 is doing?
932
Posted By wincrazy
My string looks like this: echo 20140403...
My string looks like this:
echo 20140403 07:26:26 IN:CTRL=[CIN=CIN3]:TYP=TYP2:DCN=DCN3:DATA=[xxxxx DCN3 xxxxxxxxx xxxx DCN3 xxx xxx xx xxxx xxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxx...
932
Posted By wincrazy
awk statement to grep (bit involved)
Hellow:
I have the following data.

id1 xxx xxx xxx id1 xxxx xxx xxx
id2 xxx xxx xxx id2 xxxx xxx xxx id2



In my awk script which reads the file containing the above data I have the...
1,359
Posted By wincrazy
vgres99; perfect carona:No, it is a sample how...
vgres99; perfect
carona:No, it is a sample how my file looks like, it is way bigger than that, need a sample code so i can apply to it
1,359
Posted By wincrazy
File manipulation
I have a CSV file that needs to be loaded to a DB. It appears the copy utility expects fixed number of tokens per line so as to insert data into the corresponding database fileds. My input looks like...
2,454
Posted By wincrazy
Hmm. If I am in a EST with daylight savings...
Hmm. If I am in a EST with daylight savings observed, what needs to be changed to the above. I use this logic for a set of dates and 20140310 is just n example

---------- Post updated at 04:32 PM...
2,454
Posted By wincrazy
Date - incorrect results for previous date
Hello:
I am bit puzzled with what I could be doing wrong and any help is appreciated.
I have a date in YYYMMDD format and I need to find the previous date. Based on the input on this forum, I have...
1,739
Posted By wincrazy
Grep and exttract multiple lines
Hello:
I am trying to use grep in cygwin to do the following, however I am unable to get the output in the desired format. Please see and let me know how to solve this

Input log file
20140403...
1,391
Posted By wincrazy
Thanks Yoda , Don cragun It worked
Thanks Yoda , Don cragun
It worked
1,391
Posted By wincrazy
Good catch.. It was a typo on my part. Not much...
Good catch.. It was a typo on my part. Not much change from my requirements though.
The output need to contain CID4 and CID5, for brevity I left the off
It was a typo on "CID ID" and needs to be...
1,391
Posted By wincrazy
Compare two files and merge into third
Hello:
Newbie with Awk. Trying to compare two files and merge data based on CID. Please see the input file format and desired output. Any help is appreciated.

TIA


Input File1

CID1 ---...
1,690
Posted By wincrazy
Thanks. One issue. I am not sure how to show. I...
Thanks. One issue. I am not sure how to show. I did a wc-l on the generated file and I see ONE line extra than the original file. I do not see any characters but something non-printable is being...
1,690
Posted By wincrazy
Yes I would need the trailing comma. The idea is...
Yes I would need the trailing comma. The idea is if I have ",," it needs to be replaced with ",0.0,"

I ran your script and it seems to work. let me try on my large file
1,690
Posted By wincrazy
The output needed is 2,3,1,0.0,0.0,4 ...
The output needed is

2,3,1,0.0,0.0,4
1,2,3,0.0,0.0,0.0,0.0,5,
8,7,3,4,0.0,0.0,0.0,
However I am getting

2,3,1,0.0,0.0,4
1,2,3,0.0,0.0,0.0,0.0,5,0.0
8,7,3,4,0.0,0.0,0.0,0.0
1,690
Posted By wincrazy
while read line do echo $line|awk -F"," '{ ...
while read line
do
echo $line|awk -F"," '{

for (i = 1; i <= NF; ++i) {
if ($i == "")
printf("0.0,")
else {

printf("%s,", $i)

}...
1,690
Posted By wincrazy
Insert data between comma delimiters-large file
Having a huge file in the following format.
2,3,1,,,4
1,2,3,,,,,5,
8,7,3,4,,,,

Output needed is:
2,3,1,0.0,0.0,4
1,2,3,0.0,0.0,0.0,0.0,5,
8,7,3,4,0.0,0.0,0.0,

I have tried reading the...
Showing results 1 to 20 of 20

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