Hi All,
How do i remove continuos blank lines from a file.
I have a file with data:
Code:
abc;
def;
ghi;
jkl;
mno;
pqr;
In the above file, there are two blank lines. I want to remove, one out of them.
My output should look like:
Code:
abc;
def;
ghi;
jkl;
mno;
pqr;
With the below command, all the blank lines are getting deleted. I don't want that.
Hi folks,
What I have are config files with lines that: are blank, start with a "!" or start with char's(or a blank space and then char's)
I am using ksh
I can display each line by doing:
Code:
for INDEX in {0..$LENGTH}
do
echo "${data[$INDEX]}"
done
What I need to do requires I can separate the lines into the three classes
the psudo code looks like this:
C
http://homepage.ntlworld.com/edmund....y-evans/cc500/
Quote:
I wrote this tiny compiler, which translates a subset of C into x86 machine code, for fun. It has no use, unless it counts as educational. I called it CC500 because I initally guessed it would take about 500 lines. It turned out to be about 600 lines even without the comments and blank lines.
Hi All,
Need a small help in writing a shell script which can delete a few lines from a file which is currently being used by another process.
File gets appended using tee -a command due to which its size is getting increased.
Contents like :
Code:
[INFO] 25/09/2012 05:18 Run ID:56579677-1
My requirement is to remove lines which are more than 1 month old...
Hi
I have written a bash script to capture the output of jmap.
The command i execute is jmap -heap <pid>
This gives details of memory usage of the process with <pid>.
Now jmap not only gives this info but also prints couple more lines, which i am not interested in.
Hi All,
I am creating a text file using perl. The first record I am writing as "$line" and all the other as "\n$line". At the end the file is having N number of lines.
I would like to write a script that takes something like this:
Line 1
Line 2
Line 3
Line 4
[Blank line]
Line 6
Line 7
Line 8
Line 9
[Blank line]
etc....
And makes it to look like this:
Line 1|Line 2|Line 3|Line 4|[Blank line, if it's easier]
Line 6|Line 7|Line 8|Line 9|[Blank line, if it's easier]
etc.
I would think it would be fairly easy to use two loops, one for the the 5-li
i want to search a log for a string.
Hi All,
I am supposed to write a script to do the following:
Create the file below and call it dots_dash.
_ _._ _.._ _ _
_ _ _._._ _ _ _
_ _ _ _._ _ _..
_.._ _ _ .._ _
_ _ _ _._ _ _ _
.._ _..._ _ _
_ _ _ _._ _ _ _ _
_ _ _..._ _ _ _
_ _.._.._ _ _
_.._ _ _.._ _
a. Write a script to remove the blank lines.
b. Amend the script so it does the above and removes any duplicate lines.
c.