10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I have a file like below
#Fields section bald
1234 2345 456 222
abcs dddd dddd ssss
mmmm mmm mmm
i need do not process a files stating with #
I was written code below
while read -r line
do
if
then
echo ${line} >>
elif
then
... (3 Replies)
Discussion started by: Chenchireddy
3 Replies
2. Shell Programming and Scripting
I have requirement in my every files starting lines have # needs to be not processing or exclude the that lines.
I have written a code like below, but now working as expected getting ERROR" line 60:
1 #!/bin/sh
2 echo ======= LogManageri start ==========
3
4 #This directory is... (1 Reply)
Discussion started by: Chenchireddy
1 Replies
3. Shell Programming and Scripting
/bin/sed -n ';4757335,$ p' | wc -l
/bin/sed -n ';4757335,$ p' | egrep "Failed" | egrep -c "PM late arrrival"
how can i combine the above two sed commands into one? i want to count the number of lines between the specified line number and the end of the file. AND and i want to count how many... (5 Replies)
Discussion started by: SkySmart
5 Replies
4. UNIX for Dummies Questions & Answers
I have a directory question where I ask the user which entry he wants to delete...
echo "Which entry?"
read entry
sed '/^'$entry'/d' file
This code does in fact delete that particular entry...
HOWEVER, when I go to inquire about that same entry, it still populates like it was never... (4 Replies)
Discussion started by: itech4814
4 Replies
5. Shell Programming and Scripting
Hello, im using ex to manipulate some text. Im trying to delete all the lines except those on which a certain regex can be found.
the important part of the script:
ex temp << 'HERE'
g/regex/p
HERE
this command prints the lines I want to end up with, but it doesnt delete the others.... (2 Replies)
Discussion started by: drareeg
2 Replies
6. Shell Programming and Scripting
hi all,
i have got a scenario in which i need to delete all the lines that ends with file names.
e.g.
input can be
cms/images/services_icons/callback.png
cms/cms/images/services_icons/sync.php
cms/cms/images/services_icons
and output should be
cms/cms/images/services_icons
... (13 Replies)
Discussion started by: kashifv
13 Replies
7. UNIX for Dummies Questions & Answers
Hi,
I've worked out that my server was getting clogged with the access_log.processed file.
I deleted it using the command
> /var/www/vhosts/domain.com/statistics/logs/access_log.processed
I also set that up as a crontab job for every Wednesday.
What I was wondering is the version using... (4 Replies)
Discussion started by: chickenhouse
4 Replies
8. Shell Programming and Scripting
Hi,
I have a file that gets automatically generated and it would look something like
sakjsd
adssad
{{word}}
sddsasd
dsdsasa
.
.
.
So basically what I want to do is just keep the stuff below the {{word}} marker. The marker includes the brackets. Is there any command to delete the... (3 Replies)
Discussion started by: eltinator
3 Replies
9. Shell Programming and Scripting
I am trying deleting lines from a text file using sed..
sed '/OBJECT="ABC/{N;N;N;d; }'
will do if i have to delete lines starting with Object and next 3 lines
but I was looking for a way to delet lines starting with OBJECT and all the lines till it reaches a blank lines ..or it reaches a... (8 Replies)
Discussion started by: ajnabi
8 Replies
10. Programming
I am spooling a file from oracle and trying to delete the last line of the spooled file which I am unable to do.
Problem is that this file can have multiple records each time and I have no way of knowing how many because the amount can vary. I had an idea of using a while loop to read the... (1 Reply)
Discussion started by: supercbw
1 Replies