10 More Discussions You Might Find Interesting
1. IP Networking
I want to know, for internet access, if there is an easy way to filter domain names, on your Linux box, that match certain key(s) without using squid. For example, if you want to block example.com you add the following lines in your /etc/hosts file:
0.0.0.0 www.example.com
0.0.0.0 example.com... (2 Replies)
Discussion started by: milhan
2 Replies
2. Shell Programming and Scripting
Trying to use awk to find a keyword and return the matches in the row, but also $1 and $2, which are the unique id's, but they only appear once. Thank you :).
file
name 31 Index Chromosomal Position Gene Inheritance
122 2106725 TSC2 AD
124 2115481 TSC2 AD
121 2105400 TSC2 AD... (6 Replies)
Discussion started by: cmccabe
6 Replies
3. Shell Programming and Scripting
Assume a string that contains one or multiple occurrences of three different keywords (abbreviated as "kw"). I would like to replace kw2 with some other string, say "qux". Specifically, I would like to replace that occurrence of kw2 that is the first one that is preceded by kw1 somewhere in the... (4 Replies)
Discussion started by: M Gruenstaeudl
4 Replies
4. Shell Programming and Scripting
I have data that looks like the below:
PXL-A0000005 DTE3504500000005
PXL-A0000007 DTE3504500000007
PXL-A0000014 DTE3504500000014
PXL-A0000015 DTE3504500000015
PXL-A0000016 DTE3504500000016
What I am trying to do is use the value in $1 and substitute it in catno=....&storage . I do... (2 Replies)
Discussion started by: cmccabe
2 Replies
5. UNIX for Dummies Questions & Answers
Hi I have a question and hope I can get answer here. Thank you in advance.
I have two files:
file1:
aa X
bb Y
cc Z
file2:
cc A
bb B
dd C
aa D
bb E
If the 1st column match in both file1 and file2, the 2nd column in file2 will be replaced by the 2nd column in file1. If there is no... (2 Replies)
Discussion started by: yuejian
2 Replies
6. UNIX for Dummies Questions & Answers
Hi, I was trying to figure this out but failed so I hope someone here can help me, thank you in advance.
I have two files.
file1: aa M
bb N
cc O
dd P
ee Q file2: aa A_87_P254063
cc A_87_P016532
bb A_87_P104793
dd A_87_P055331
ee A_87_P059706
aa A_87_P071636
ee A_87_P028302... (2 Replies)
Discussion started by: yuejian
2 Replies
7. Shell Programming and Scripting
Hi Perl users,
I have another problem with text processing in Perl. I have a file below:
Linux Unix Linux Windows SUN
MACOS SUN SUN HP-AUX
I want the result below:
Unix Windows SUN
MACOS HP-AUX
so the duplicate string will be removed and also the keyword of the string on... (2 Replies)
Discussion started by: askari
2 Replies
8. Shell Programming and Scripting
not getting anywhere with this
an xml file contains multiple clients set up with same tags, different values.
I need to parse the file for client foo, and change the value of tag "64bit" from false to true.
cat clients.xml
<Client type"FIX">
<ClientName>foo</ClientName>... (3 Replies)
Discussion started by: jack.bauer
3 Replies
9. UNIX for Dummies Questions & Answers
Hi,
I started exploring unix recently. Now i have got a requirement like i have a input file where i am having some strings line by line (One string Might be single line or multiple lines). Now i need find these strings in another file and if its found i have to replace it with another string... (2 Replies)
Discussion started by: Sivajee
2 Replies
10. Shell Programming and Scripting
Suppose,
d=ABC*.BGH.LKJ
Now I want to replace 'DEFGHIJ' instead of '*.B' and store the value in d. Any Idea? Can we use sed here?
The outout should be like this:
d=ABCDEFGHIJGH.LKJ
Please help.. (4 Replies)
Discussion started by: Niroj
4 Replies