10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
// Redhat
I am running a cron with cp every 15 minutes.
cp /p2/arch/log/* /p2/bkp
What I need is to not to copy the file again if the filename already exists under /p2/bkp
The reason is that the file size under /p2/arch/log/ will be reduced (contents truncated), so I need to keep the... (10 Replies)
Discussion started by: Daniel Gate
10 Replies
2. Shell Programming and Scripting
I've one EDI file which is to be parsed into 7 different file.
I managed to extract required segments for a file(HEADER) to a separate file(sample3.dat) and is given below.
$ cat sample3.dat
REF*EI*273543997~
REF*2U*HELLO~
REF*G2*77685|132~
CLM*1000*0.00***12>B>1*N*A*Y*I~
CN1*05~... (5 Replies)
Discussion started by: ashokv3
5 Replies
3. Shell Programming and Scripting
How do I move all folders and its contents from a directory A to another directory B, skipping all files in Directory A ?
---------- Post updated at 12:53 PM ---------- Previous update was at 12:42 PM ----------
Ok. Got it.
mv /A/*/ /B/ (1 Reply)
Discussion started by: DHeisenberg
1 Replies
4. Shell Programming and Scripting
Hi,
In file zip folder i have many files but i want to extract onlu .LOG file from the zip.
How can i achive this
Rajesh (3 Replies)
Discussion started by: guddu_12
3 Replies
5. UNIX for Dummies Questions & Answers
I have 2 files with the same header and need to append them and put the result in a 3rd file
the 2 files has the same header and while appending i want to skip the second file header and need the result to be put in a third file
Normally, this would work
Cat file1 file2 >> file3....But how... (5 Replies)
Discussion started by: saggiboy10
5 Replies
6. Shell Programming and Scripting
hi! i have two files that looks like this
file 1:
ABS 123 456
BCDG 124 542
FGD 459 762
file 2:
ABS 132 456
FGD 459 762
output would be:
from file1:
ABS 132 456
BCDG 124 542
from file 2:
ABS 132 456 (4 Replies)
Discussion started by: kingpeejay
4 Replies
7. Shell Programming and Scripting
hi! i researched about comparing two columns here and got an answer. but after examining my two files, i found out that the first columns of the two files are not unique with each other. all i want to compare is the 2nd and 3rd column.
FILE 1:
ABS 456 315
EBS 923 163
JYQ3 654 237
FILE 2:... (1 Reply)
Discussion started by: engr.jay
1 Replies
8. Shell Programming and Scripting
I am trying to print 1st, 2nd, 13th and 14th fields of a file of line numbers from 29 to 10029. I dont know how to put this in one code. Currently I am removing the selected lines by
awk 'NR==29,NR==10029' File1 > File2
and then doing
awk '{print $1, $2, $13, $14}' File2 > File3
Can... (3 Replies)
Discussion started by: ananyob
3 Replies
9. Shell Programming and Scripting
I have learned file comparison from my previous post here. Then, it is comparing the whole line. Now, i have a new problem.
I have two files with 3 columns separated with a "|". What i want to do is to compare the second and third column of file 1, and the second and third column of file 2. And... (4 Replies)
Discussion started by: kingpeejay
4 Replies
10. Shell Programming and Scripting
I wanna remove a set files other than some selected files.
Eg.
:rolleyes::rolleyes::rolleyes:
a directory contains n files like
test1.dat
test2.dat
test3.dat
test4.dat
out5.dat
out1.dat
i wanna remove all files which doesnot name like *test*
I want to use this in shell... (22 Replies)
Discussion started by: freakygs
22 Replies