10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi ,
I want to remove the specific pattern and remove those lines from file using shell script.
i want to remove these lines
<?xml version='1.0' encoding='UTF-8'?>
<row_set>
</row_set>
my input file has content like this.
file name: sample.xml
<?xml version='1.0'... (4 Replies)
Discussion started by: nukala_2
4 Replies
2. UNIX for Dummies Questions & Answers
Hi,
I have 2 files like below.
File A:
apple
mango
File B:
start
abc
def
apple
ghi
end
start
cba
fed (4 Replies)
Discussion started by: jayadanabalan
4 Replies
3. Shell Programming and Scripting
Hi fellas,
I have a file like this:
A_B
B_D
C_D
D_B
E_F
G_H
B_A
F_E
In other words, I have member1_member2 and member2_member1 in the same file. In the exemple aforementioned I have A_B and B_A, B_D and D_B, E_F and F_E.
So, I would like to know a sript that print the lines B_A, D_B... (3 Replies)
Discussion started by: valente
3 Replies
4. Shell Programming and Scripting
Hi , i am a new with perl, i want to made a script that find in file rows that start with specil words, as an example a line will start with"
.............................................
specialword aaa=2 bbb=5
.............................................
and to put this in a new file... (3 Replies)
Discussion started by: alinalin
3 Replies
5. UNIX for Dummies Questions & Answers
What is the best way to display lines in a log file that begin with a certain string?
Preferably I would like to 'print' them to a file. I guess I would use 'cat' for that?
There are two types of line I would like to get at - each begins with a different two words.
It would be something... (8 Replies)
Discussion started by: Sepia
8 Replies
6. Shell Programming and Scripting
I'm trying to search for lines ending with "}" with the following command but am not getting any output.
grep '\}$' myFile.txt
I actually want to negate this (i.e. lines not ending with "}"), but I guess that should be easier once I find the command that finds it? (11 Replies)
Discussion started by: BootComp
11 Replies
7. Shell Programming and Scripting
hi guys! I`ll really appreciate your help.
The situation is:
i have a log file, and i need to get the needed lines from it.
linecount=$(cat -n http.log | grep ALERT | awk '{print $1}' | wc -l)
lines=$(cat -n http.log | grep ALERT | awk '{print $1}')
1-string gets the number of found lines... (2 Replies)
Discussion started by: neverhood
2 Replies
8. Shell Programming and Scripting
I have the task of removing all uppercase words from csv files, mit
10000's lines. I think it shoud be possible with regex's, something
like "s/{2,}//g" but I can't get it work with sed or Vi. It would
also be possible to script in ksh, awk, perl or python.
example
this "this is a EXAMPLE... (5 Replies)
Discussion started by: frieling
5 Replies
9. Shell Programming and Scripting
hi,
i'm making now a bash script, that runs some compiler... i want to take only errors form its output eg:
output:
bla bla bla
...
erros is 1324546
the bla bla bla
bla bla bla...
...
and i want to get only
erros is 1324546
the bla bla bla (11 Replies)
Discussion started by: miechu
11 Replies
10. UNIX for Dummies Questions & Answers
Hello
I'm trying to replace a string in multiple text files using the tcsh shell. For example I've got some files called test1 test2 test3 etc. Each of them contains "Hello World". Now I want to replace each "Hello" with "Howdy" using sed and a foreach loop.
I tried the following but it... (1 Reply)
Discussion started by: dwidmer
1 Replies