10 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
I have this fileA
TEST FILE ABC
this file contains ABC;
TEST FILE DGHT this file contains DGHT;
TEST FILE 123
this file contains ABC,
this file contains DEF,
this file contains XYZ,
this file contains KLM
;
I want to have a fileZ that has only (begin search pattern for will be... (2 Replies)
Discussion started by: vbabz
2 Replies
2. Shell Programming and Scripting
I have a file with many lines which contain strings like .. etc.
But with no rule regarding field separators or anything else.
I want to print ONLY THE STRING from each line , not the entire line !!!
For example from the lines :
Flow on service executed with success in . Performances... (5 Replies)
Discussion started by: black_fender
5 Replies
3. Shell Programming and Scripting
Hello Guyz
I have been following this forum for a while and the solutions provided are super useful. I currently have a scenario where i need to search for a pattern and start searching by keeping the first pattern as a baseline
ABC
DEF
LMN
EFG
HIJ
LMN
OPQ
In the above text i need to... (8 Replies)
Discussion started by: RickCharles
8 Replies
4. Shell Programming and Scripting
Objective:
Recursively search all files under a directory for SQL statements that end with ";"
Sample input:
UPDATE table1
set col=val
UPDATE table2
set cola=vala
,colb=valb;
UPDATE table3
set col=val
Expected output:
UPDATE table2
set cola=vala
,colb=valb; (1 Reply)
Discussion started by: krishmaths
1 Replies
5. Shell Programming and Scripting
Hi,
I have a text file with the following content:
monday,20
tuesday,10
wednesday,29
monday,10
friday,12
wednesday,14
monday,15
thursday,34
i want the following output:
monday,45
tuesday,10
wednesday,43
friday,12 (3 Replies)
Discussion started by: prashu_g
3 Replies
6. Shell Programming and Scripting
I am wanting to take a list of strings and loop through a list of textfiles to find matches. Preferably with awk and parsing the search strings into an array.
// Search_strings.txt
tag
string
dummy
stuff
things
// List of files to search in
textfile1.txt
textfile2.txt
The... (6 Replies)
Discussion started by: sdf
6 Replies
7. Shell Programming and Scripting
Hi, i would really appreciate any help anyone can give with the following info.
Thanks in advance.
I need to run a search on a file that contains thousands of trades, each trade is added into the file in blocks of 25 lines. i know the search has to take place between a time stamp specified... (4 Replies)
Discussion started by: sp3arsy
4 Replies
8. Shell Programming and Scripting
If i wanted to search for two strings that are on lines in the log, how do I do it?
The following code searches for just one string that is one one line.
awk '/^/ {split($2,s,",");a=$1 FS s} /failure agaf@fafa/ {b=a} END{print b}' urfile
What if I wanted to search for "failure agaf@fafa"... (3 Replies)
Discussion started by: SkySmart
3 Replies
9. Shell Programming and Scripting
Hi, how do I match a particular element in a list and replace it with blank?
awk 'sub///' $FILE
list="AL, AK, AZ, AR, CA, CO, CT, DE, FL, GA,
HI, ID, IL, IN, IA, KS, KY, LA, ME, MD,
MA, MI, MN, MS, MO, MT, NE, NV, NH, NJ,
NM, NY, NC, ND, OH, OK, OR, PA, RI, SC,
SD, TN, TX, UT, VT, VA, WA,... (2 Replies)
Discussion started by: grossgermany
2 Replies
10. Shell Programming and Scripting
Hi All,
I have files:
1. abc.sql
'This is a sample file for testing'
This does not have quotations
this also does not have quotations.
and this 'has quotations'.
here I need to list the hard coded strings 'This is a sample file for testing' and
'has quotations'.
So i have... (13 Replies)
Discussion started by: kprattip
13 Replies