Hi All ! I am trying to copy all files with extension .sh to one folder, following command I am using
above command working fine but I have some .sh file with same base name different directory, so I would copy all .sh file including duplicate, if suppose base name of 2 or more files are same then I want to rename them by adding number and then copy to destination. For example script.sh in directory foo and another script.sh in directory foo1 then destination directory Scripts should contain both script and it should have name like this script_1.sh script_2.sh
Note : I am trying to run above command from home directory so that all scripts in Desktop, Document and other folders can be copied to destination
please let me know how to modify above command
It certainly slows things down to not use 'cp many-files dir', so consider telling cp not to overwrite = -n, capture stderr back to stdout in a wrapper ()2>&1 | and process it to do the up-version work only.
Dear folks
I have a map file of around 54K lines and some of the values in the second column have the same value and I want to find them and delete all of the same values. I looked over duplicate commands but my case is not to keep one of the duplicate values. I want to remove all of the same... (4 Replies)
I have a file contails as below
I/P:
123456
123456
234567
987654
678905
678905
Like above i have 1000's of entries
I need output as below
O/P:
123456
678905
I'm using uniq -d filename it is showing results but it is missing few duplicate entries and i dont know why.Please... (9 Replies)
Hi,
In a file, I have to mark duplicate records as 'D' and the latest record alone as 'C'.
In the below file, I have to identify if duplicate records are there or not based on Man_ID, Man_DT, Ship_ID and I have to mark the record with latest Ship_DT as "C" and other as "D" (I have to create... (7 Replies)
Hi all:
Let's suppose I have a file like this (but with many more records).
XX ME 342 8688 2006 7 6 3c 60.029 -38.568 2901 0001 74 4 7603 8
969.8 958.4 3.6320 34.8630
985.5 973.9 3.6130 34.8600
998.7 986.9 3.6070 34.8610
1003.6 991.7 ... (4 Replies)
how can I find cpu usage memory usage swap usage and
I want to know CPU usage above X% and contiue Y times and memory usage above X % and contiue Y times
my final destination is monitor process
logical volume usage above X % and number of Logical voluage above
can I not to... (3 Replies)
I need a perl script, which will run every midnight via cronjob and e-mail few users once it finds any duplicated value in a file which is located /etc/hosts, the file name is called hosts and the format of the file has 3 colums and some time 2 columns. The script will look for duplicate IP or... (3 Replies)