Search Results

Search: Posts Made By: High-T
4,730
Posted By High-T
Hi RudiC and Don, Following script worked...
Hi RudiC and Don,

Following script worked for me.
Thanks for the guidance.

#!/bin/ksh
> File3.txt
> Unmatched.txt
awk '
BEGIN {
OFS="\t"
out_m = "File3.txt"
out_nm =...
4,730
Posted By High-T
I have updated the question with the script. ...
I have updated the question with the script.

awk 'FNR == NR && ! /^[[:space:]]*$/ { key = substr($0,1,8); a[key] = $0; next }
$1 == "01" { if (key != 0)
{
if (key...
4,730
Posted By High-T
Thanks RudiC. I have realized that I should not...
Thanks RudiC. I have realized that I should not be using this term as I am getting help for free. I have reviewed the policy and I would be careful next time. Thanks for all your help.

----------...
3,139
Posted By High-T
awk - (URGENT!) Print lines sort and move lines if match found
URGENT HELP IS NEEDED!!

I am looking to move matching lines (01 - 07) from File1 and 77 tab the matching string from File2, to File3.txt. I am almost done but

- Currently, script is not...
4,840
Posted By High-T
Is it possible if I can put a time interval...
Is it possible if I can put a time interval between the awk script and mv commands??

This would resolve my issue.
4,730
Posted By High-T
awk - Print lines if only matching key is found
I am looking to move matching lines (01 - 07) from File1 and 77 tab the matching string from File2, to File3.txt. I am almost done but

- Currently, script is not printing lines to File3.txt in...
4,840
Posted By High-T
Since i dont see any error message , I cant...
Since i dont see any error message ,

I cant tell if it is coming from thie 2nd or the 1st command but to my understanding, it is coming from mv DEF.txt ABC.txt

I misused the word error....
4,840
Posted By High-T
Yes i got the correct output But no error...
Yes i got the correct output
But no error message is displayed.
It doesnot work at all.
To my understanding, it is reading and writing to the file in the same time.
Is it possible if I can put a...
4,840
Posted By High-T
I have tried the same script but it does not...
I have tried the same script but it does not rename the DEF.txt to ABC.txt.
If i put
mv DEF.txt XYZ.txt
Then it works fine
4,840
Posted By High-T
Awk
Actually it does not show any error but does not process the file.
And you are right, the awk script i types was in incorrect format.
But even the corrected one is not processing the file.
I am...
4,840
Posted By High-T
awk - Rename output file, after processing, same as input file
I have one input file ABC.txt and one output DEF.txt. After the ABC is processed and created output, I want to rename ABC.txt to ABC.orig and DEF to ABC.txt. Currently when I am doing this, it does...
2,415
Posted By High-T
Awk - Rename output file when it is processed same as input file
Thanks a lot Don.
Code in Reply #8 worked for me...
I wasnt testing it properly.
Bundle of thanks.
2,415
Posted By High-T
@RudiC I tried modifying the script but it is...
@RudiC I tried modifying the script but it is still not working. Is it possible if you can modify my script? I want to know what exactly you meant :)
Thanks,
1,844
Posted By High-T
RESOLVED!!!
Thanks Don.
You're method worked.
Thanks for assisting.
I appreciate your help.
2,415
Posted By High-T
Need to use this script as this is only a part of a big script.
Thanks Don and Rodic for sharing your great knowledge and advise.
Actually I have to use this script because this part has been extracted from a major script and logics are being used in other parts...
2,415
Posted By High-T
awk - Print whole string ending with a Tab if key matched
Hi ,

I am looking to print the whole string from file2.txt but it is only printing 77 but not the whole matched string from File2.txt Any help is appreciated.
Thanks,

Script

awk '
BEGIN...
1,844
Posted By High-T
awk - Compare files in two different directories
Hi,
My script works fine when I have both input files in the same directory but when I put on of the input file in another directory, the output does not show up.

SCRIPT:

awk '
BEGIN {
...
Showing results 1 to 17 of 17

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