10 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
Hi all,
I have searched and searched, but I have not found a solution that quite fits what I am trying to do.
I have a long list of data in three columns. Below is a sample:
1,10,8
2,12,10
3,13,12
4,14,14
5,15,16
6,16,18
Please use code tags
What I need to do is as follows: If a... (4 Replies)
Discussion started by: bleedingturnip
4 Replies
2. Shell Programming and Scripting
Hi
I have a big text file. I want to extract all the sentences that matches at least 70% (seventy percent) of the words from each sentence based on a word list called A.
Say the format of the text file is as given below:
This is the first sentence which consists of fifteen words... (4 Replies)
Discussion started by: my_Perl
4 Replies
3. Shell Programming and Scripting
I have one requirement to delete all lines from a file if it matches below scenario. File contains three column. Employee Number, Employee Name and Employee ID
Scenario is: delete all line if Employee Number (1st column) contains below
1. Non-numeric Employee Number
2. Employee Number that... (3 Replies)
Discussion started by: anshu ranjan
3 Replies
4. Shell Programming and Scripting
I have a file
cat 1.txt
AAAA , BBBB , CCCC , DDDD
DFDF , DFDF , DFDF , FDDD
AA11 , DFDF , 0000 , UTIO
ADSD , WERT, 0000 , JKJL
If the 3rd column is not equal to "0000" , then it should replace "0000" with "XXXX" and if its equal to "0000" then print the line as it is.
need help. (9 Replies)
Discussion started by: aravindj80
9 Replies
5. Shell Programming and Scripting
Can anyone please help with this? I have 2 files as given below.
If 2nd column of file1 has pattern foo1@a, find the matching 1st column in file2 & replace 2nd column of file1 with file2's value.
file1
abc_1 foo1@a ....
abc_1 soo2@a ...
def_2 soo2@a ....
def_2 foo1@a ........ (7 Replies)
Discussion started by: prashali
7 Replies
6. Shell Programming and Scripting
I have a file file123.xml which looks like this
xmlEntry="username"="josh" <property="never_back_down">
phone="<178652>"
apn=property:address="wonderland"
xmlEntry="username"="jessica" <property="never_back_down">
phone="<178653>"
apn=property:address="wonderland"... (5 Replies)
Discussion started by: poga
5 Replies
7. Shell Programming and Scripting
I have one comma separated file (a.txt) with two or more records all matching except for the last column.
I would like to merge all matching lines into one and consolidate the last column, separated by ":". Does anyone know of a way to do this easily?
I've searched the forum but most talked... (6 Replies)
Discussion started by: giannicello
6 Replies
8. Shell Programming and Scripting
Hi
I have files with names that contain the date in several formats as, YYYYMMDD, DD-MM-YY,DD.MM.YY or similar combinations.
I know if a file fits in one pattern or other, but i donīt know how to extract the substring contained in the file that matches the pattern.
For example, i know that
... (1 Reply)
Discussion started by: pjrm
1 Replies
9. Shell Programming and Scripting
Howdy.
I know this is most likely possible using sed or awk or grep, most likely a combination of them together, but how would one go about running a grep like command on a file where you only try to match your pattern to the second field in a line, space delimited?
Example:
You are... (3 Replies)
Discussion started by: LordJezoX
3 Replies
10. Shell Programming and Scripting
I am attempting to convert rewrite rules to Nginx, and since due to the mass amount of rewrites we must convert, I've been trying to write a script to help me on a specific part, easily.
So far I have this:
rewrite ^action/static/(+)/$ staticPage.php?pg=$1&%$query_string;
What I want done... (5 Replies)
Discussion started by: EXT3FSCK
5 Replies