Search Results

Search: Posts Made By: nuthalapati
2,094
Posted By nuthalapati
Find result using for loop
I want to print each file i found using the find command. And not able to list the files at all here is the code


SEARCH_DIR="/filesinfolder";
PATH_COUNT=0

for result in "'/usr/bin/find ...
3,200
Posted By nuthalapati
The problem is find is not writing all the files...
The problem is find is not writing all the files to files.txt. And the files.txt is needed for further processing.
3,200
Posted By nuthalapati
Make cron wait for the child process
I am trying to find a list of files and writing it to a text file. Based on the machine performance the file writing will be slow at certain time.

The code to find file and redirecting the...
1,887
Posted By nuthalapati
I meant different for the "Number of files find...
I meant different for the "Number of files find returns".

Search directory is standard everytime. Days ago is 1 (which is yesterday).

The command is called in a script which is run by cron,...
1,887
Posted By nuthalapati
find cmd works different on cron job ?
/usr/bin/find $SEARCH_DIR -daystart \( \( -name 'KI*' -a -name '*.csv' \) -o -name '*_xyz_*' \) -mtime $DAYS_AGO -printf %f -printf "\n" | sort -r > $FILES


The above command gives different...
2,131
Posted By nuthalapati
Both the solutions works fine. If there is no...
Both the solutions works fine. If there is no data in the last column the script fails.

---------- Post updated at 07:32 AM ---------- Previous update was at 12:54 AM ----------

awk '{printf...
2,131
Posted By nuthalapati
Remove new line at the end of each line
"376964582","1","rotated","2010-05-06 12:40:47","1205847472","436201","444070","444070","sv","663","dm","Exceeded","2","2001","21","deer","10","21
"
"376964582","1","rotated","2010-05-06...
3,975
Posted By nuthalapati
It works, seems to be identifying duplicates...
It works, seems to be identifying duplicates overall. But I need to identify duplicates per column.
3,975
Posted By nuthalapati
Thanks for the reply kcoder. Its not...
Thanks for the reply kcoder.

Its not printing out the duplicate value
3,975
Posted By nuthalapati
Find and replace duplicate column values in a row
I have file which as 12 columns and values like this


1,2,3,4,5
a,b,c,d,e
b,c,a,e,f
a,b,e,a,h


if you see the first column has duplicate values, I need to identify (print it to console)...
4,298
Posted By nuthalapati
Thanks Scott. I overlooked $(date...
Thanks Scott.

I overlooked $(date '+%Y%m%d') ' single quote earlier.

You know how we can avoid ^m chars ? im getting it at the end of the file.

Thanks again.

---------- Post updated at...
4,298
Posted By nuthalapati
Shell script dynamic command
I need to run a shell script with dynamic command in it like

# Begin script...

mysql xx "select * from tab" | sed 's/\t/|/g' > GENERATED_20100304.txt

the dynamic part is 20100304 which...
6,234
Posted By nuthalapati
Lets say the files are like this File Name:...
Lets say the files are like this

File Name: X1.txt

header1st
abc
bcd
age

File Name: X2.txt

header1st
abcege
ageerw
ageaer

.......

in my result file Y.txt
6,234
Posted By nuthalapati
Read file(s) and SFTP it
I have files starting with some char 'X' (they could vary from day to day) and I have to read all the files starting with char X*.txt and write to a single file Y.txt. But I have to omit the first...
3,102
Posted By nuthalapati
Getting Common value in three files
I have 3 files

1.csv
abc
def

2.csv
abc
xyb

3.csv
abc
e23
frw

I need to search for the common word in all the three files. How do i do that in awk ?
9,878
Posted By nuthalapati
Thanks Everyone.
Thanks Everyone.
9,878
Posted By nuthalapati
convert d/m/yyyy to YYYY-MM-DD
My csv has data like this

x,x,3452,2/18/1986,abc (k.dickson01@insightbb.com,kathleen,martin,41042,2/18/1986,KY,(859)
x,g,19711,1/24/1986,...
14,003
Posted By nuthalapati
Convert DD-MMM-YYYY to MM-DD-YYYY
I have a file which has 100k+ records like this


(mcauley27@msn.com,05-JUN-1974,Venezuela,Maureen,F,1,McAuley,,,,83301-5971)abc,05-JUN-1974,def,lk...
1,843
Posted By nuthalapati
And the record sizes are different. I mean file1...
And the record sizes are different. I mean file1 has 80000 records and file 2 has 2million records.
1,843
Posted By nuthalapati
Strip double quotes and compare value
file1:

Code:
laeg.com,2/2/23,a,b
gaaeg.com,2/2/23,a,b
gaxyz.com,2/2/12,a,b
ceg.com,2/2/23,a,b,ga
file2:

Code:
1,2,ua,"xyz.com"
1,2,ua,"abc.com"
1,2,ua,"eg.com"
1,2,ua,"easg.com"...
2,961
Posted By nuthalapati
I had reversed the logic and tried seems to be...
I had reversed the logic and tried seems to be working but in one file the email is without quotes and in another is with quotes

"abctest.com" and abc.com so that breaking my test. How do we...
2,961
Posted By nuthalapati
Vgersh99, Thank you so much. I got it...
Vgersh99, Thank you so much.

I got it running. What I did is installed gawk for windows xp and ran this script and it worked. So something problem with my unix machine.

My new problem is file1...
2,961
Posted By nuthalapati
Something is seriously wrong, may be awk version...
Something is seriously wrong, may be awk version (3.1.3) or something. Coz I always get this output.

laeg.com,2/2/23,a,b,ga
aeg.com,2/2/23,a,b,ga
xyz.com,2/2/12,a,b,c
eg.com,2/2/23,a,b,ga
3,094
Posted By nuthalapati
Siquadri, any idea why it could have failed at my...
Siquadri, any idea why it could have failed at my end ?
2,961
Posted By nuthalapati
vgersh99, Can you please explain your...
vgersh99,

Can you please explain your script.

Thank you.
Showing results 1 to 25 of 35

 

Featured Tech Videos

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