10 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
I have two files say FILE1 and FILE2.
FILE1 contains 80,000 filename in sorted order and another file FILE2 contains 6,000 filenames is also in sorted order.
I want to compare the filename for each file and copy them in to a folder when filename is matched.
File1.txt contain 80,000... (8 Replies)
Discussion started by: imranrasheedamu
2. Shell Programming and Scripting
I have below format log file,
Comparing csv_converted_files/2201/9747.1012H67126.5077292103609547345.csv and csv_converted_files/22019/97447.1012H67126.5077292103609547345.csv
Comparing csv_converted_files/2559/9447.1012H67126.5077292103609547345.csv and... (6 Replies)
Discussion started by: arvindshukla81
3. UNIX for Advanced & Expert Users
Hi I want to print the line until pattern is matched.
I am using below code:
sed -n '1,/pattern / p' file
It is working fine for me , but its not working for exact match.
sed -n '1,/^LAC$/ p' file
LACC FEGHRA 0
LACC FACAF 0
LACC DARA 0
LACC TALAC 0
LAC ILACTC 0... (8 Replies)
Discussion started by: Abhisrajput
4. Shell Programming and Scripting
What I would like to do is if the lines with % have the same name, then combine the last 9 letters of the string underneath the last occurrence of that ID with the first 9 letters of the string underneath the first occurrence of that ID.
I have a file that looks like this:
%GOGG... (12 Replies)
Discussion started by: verse123
5. Shell Programming and Scripting
I have two files file1.txt and file2.txt. Please see the attachments.
In file2.txt (which actually is a diff output between two versions of file1.txt.), I extract the pattern corresponding to 1172c1172. Now ,In file1.txt I have to search for this pattern 1172c1172 and if found, I have to... (9 Replies)
Discussion started by: saurabh kumar
6. UNIX for Dummies Questions & Answers
I have been racking my (limited) brains to get this to work without success
I have a file output which is a list of lists - ie a single column of data that is separated by space into sub lists below - I need to both split this so that each list is in a separate column (eg tab or semicolon... (8 Replies)
Discussion started by: Manchesterpaul
7. Shell Programming and Scripting
I am stuck in a problem. I have file like this. I want to add the fifth field of the match pattern line above the lines starting with "# @D". The delimiter is "|"
# @D0.00016870300|0.05501020000|12876|12934|3||Qp||Pleistocene||"3 Qp Pleistocene"|Q
# @P... (5 Replies)
Discussion started by: jyu3
8. Shell Programming and Scripting
I have an ugly conf file that has the string I'm interested in searching for in the middle of a block of code that's relevant, and I'm trying to find a way to remove that entire block based on the matched line.
I've googled for this problem, and most people helping are only interested in... (9 Replies)
Discussion started by: tamale
9. Shell Programming and Scripting
If there exist multiple pattern in a file, how can I find the last record matching the pattern through perl.
The below script searches for the pattern everywhere in an input file.
#! /usr/bin/perl -s -wnl
warn"Usage: $0 -pattern='RE' \n" and
exit 255;... (5 Replies)
Discussion started by: er_ashu
10. Shell Programming and Scripting
Actually i want to replace the word after a matched pattern.
lets say that i am reading a file line by line
while read line
# i need to search whether a pattern exists in the file and replace the word after if the pattern exist.
# for example :... (1 Reply)
Discussion started by: maxmave