10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Hi
I have a file:
r58778.3|SOURCES={KEY=f665931a...,fw,221-705}|ERRORS={16_1:T,30_1:T,56_1:C,57_1:T,59_1:A,101_1:A,115:-,158_1:C,186_1:A,204:-,271_1:T,305:-,350_1:C,368_1:G,442_1:C,472_1:G,477_1:A}|SOURCE_1="Contig_1092402550638"(f665931a359e36cea0976db191ff60ff09cc816e)
I want to retain... (15 Replies)
Discussion started by: Alyaa
15 Replies
2. Shell Programming and Scripting
without using conventional file searching commands like find etc, is it possible to locate a file if i just know that the file that i'm searching for contains a particular text like "Hello world" or something? (5 Replies)
Discussion started by: arindamlive
5 Replies
3. Shell Programming and Scripting
Hi
Im trying to scan a file for certain entries and remove their corresponding lines completely. What I have now is this,
for USER in user1 user2 user3 user4
do
sed '/$USER/d' /etc/sudoers
done
However this doesn't remove the entries at all. Is there another way for this?
Thanks... (2 Replies)
Discussion started by: bludhemn
2 Replies
4. Shell Programming and Scripting
Hi Gurus,
I have a file say for ex. file1 which has 3500 lines in it which are different account numbers and another file (file2) which has 230000 lines in it. I want to read all the lines in file1 and delete all those lines from file2 which has that same pattern as in file1. I am not quite... (4 Replies)
Discussion started by: toms
4 Replies
5. Shell Programming and Scripting
Hi,
Iam using the below script for searching and deleting a pattern from a file:
#!/bin/ksh
if ; then
echo "Pattern exist in redirects.virgin-atlantic.com.conf"
sleep 1000
sed '/"$value"/d' redirects.virgin-atlantic.com.conf > /opt/ADOC/users/agdadmin/test/shazin/olist
cp olist... (2 Replies)
Discussion started by: Shazin
2 Replies
6. Shell Programming and Scripting
Hi All,
I have written the below script that searches for the pattern in a file and delete them if present. please can some one have a look and suggest the changes in the script.
#!bin/sh
# The pattern that user want to add to the files
echo "Enter the pattern of the redirect"
read... (4 Replies)
Discussion started by: Shazin
4 Replies
7. Shell Programming and Scripting
Hi All,
Please can someone assist in the script I have made that searches a pattern in a file and delete the whole line containing the pattern.
#!bin/sh
# The pattern that user want to add to the files
echo "Enter the pattern of the redirect"
read value
# check if the user has... (1 Reply)
Discussion started by: Shazin
1 Replies
8. UNIX for Dummies Questions & Answers
How would i search to find all the lines consisting of of only the letter "z" followed by any four characters? (1 Reply)
Discussion started by: trob
1 Replies
9. UNIX for Dummies Questions & Answers
Hi,
I would like to do a search and replace on a file using vi.
Something like this:
:%s/dst_port=****//g
I want to search the entire file and replace all text that does not match dst_port=**** with space or nothing. In other words delete everything except for dst_port=****. The four *... (1 Reply)
Discussion started by: andyblaylock
1 Replies
10. Shell Programming and Scripting
Hello,
I am having a hard time trying to do the following:
I have a file that looks like this:
0 CacheMaxConn 4 64
0 RMThread 16 3423423
7 DataSource 0 /hello/sas/ses
0 {94545B4-E343-1410-81E4-08000000} 3 DDBE
3 ... (4 Replies)
Discussion started by: yotoruja
4 Replies