How to sort and compare files in more efficient manner?
Hello All,
Iam using below method to sort and compare files. First iam doing sorting and changing the same file and then doing comparing and taking the final result to another file.
Is their a more better or clear way of doing the above task.
Hi
I have a script to find and delete the files which are say, noDaysOld, I am interested to find the number of such files I am fniding for deleting and then deleting it.
So, the script I wrote, first finds the number of such files and then deletes, clearly this is two different steps.
... (3 Replies)
Dear All.
Im trying to know how exactly the command "compare" works, does it compare line by line or field by field, and the most important thing is that why the files have to be sorted before we compare them?
Thanks in advance (7 Replies)
Hi,
I have around 14-15 files and i want to sort all the files and then compare. I dont want to sort them and store in a different file and then compare. I want to compare two files at a time. Is there a way we can do this using a single command? (5 Replies)
Hi All
I have a flat text file. Each line in it contains a "/full path/filename". The last three columns are predictable, but directory depth of each line varies.
I want to sort on the last three columns, starting from the last, 2nd last and 3rd last. In that order. The last three columns... (6 Replies)
Hi,
I have two files say file 1 file 2
File1
1
2
4
5
File 2
asdf
adf
How to get the ouput something like
asdf1
adf1
asdf2
adf2
asdf4
adf4
asdf5 (5 Replies)
Hello,
Error
awk: Internal software error in the tostring function on TS1101?05044400?.0085498227?0?.0011041461?.0034752266?.00397045?0?0?0?0?0?0?11/02/10?09/23/10???10?no??0??no?sct_det3_10_20110516_143936.txt
What it is
It is a unix shell script that contains an awk program as well as... (4 Replies)
Hi there,
I had run into some fortran code to modify. Obviously, it was written without thinking of high performance computing and not parallelized... Now I would like to make the code "on track" and parallel. After a whole afternoon thinking, I still cannot find where to start. Can any one... (3 Replies)
Team,
I have two files and I am trying to find the lines unique to file1. So i have executed the below command at shell prompt and got the correct results
comm -23 <(sort test) <(sort test1)
When i run the same command in Bash shell script, i got the correct results.
But when i run... (5 Replies)
I have a list of files defined in a single file , one on each line.(No.of files may wary each time)
eg. content of ETL_LOOKUP.dat
/data/project/randomname
/data/project/ramname
/data/project/raname
/data/project/radomname
/data/project/raame
/data/project/andomname
size of these... (5 Replies)
is there a more efficient way to write the following code:
for eachlfile in $(ls -ltcrd ${BACKUPDIR}/${BACKUPNAME}*/content_${BACKUPNAME}* 2>/dev/null | awk '{print $NF}')
do
echo "=========================="
... (4 Replies)