Hi friends, I am working on a perl script to count the commented lines, blank lines and source lines separately. Let me know if you have one. For example i have a file containing the lines:
/**
* SOURCE CODE
*/
public class SessionConstants {
/**
* Code for Session created
*/... (4 Replies)
Hi,
I'm not a expert in shell programming, so i've come here to take help from u gurus.
I'm trying to tailor a csv file that i got to make it work for the LOAD FROM command.
I've a datatable csv of the below format -
--in file format
xx,xx,xx ,xx , , , , ,,xx,
xxxx,, ,, xxx,... (11 Replies)
Hi,
Consider a file named "testfile"
The contents of file are as below
first line added for test
second line added for test
third line added for test
fourth line added for test
fifth line added for test (5 Replies)
Hi.. I'm facing a trouble in replacing two blank lines in a file using shell script...
I used sed to search a line and insert two blank lines after the searchd line using the following sed command.
sed "/data/{G;G;}/" filename . In the file, after data tag, two lines got inserted blank lines..... (4 Replies)
I have a file like
blah
blah blah blah
this is the text I need,
which might be between 1-4 lines, but
always has a blank line above and below
it, and is at the end of the text file
the code tags don't show the trailing blank line. I started by deleting the last blank line with:
... (2 Replies)
So the tag for this forum says all newbies welcome...
All I want to do is go through my file and find lines which contain a given string of characters then replace these with a blank line. I really tried to find a simple command to do this but failed.
Here's what I did come up with though:
... (2 Replies)
Hello All,
I have a file with data as below. Each line consists of 21 fields. I am not able to load them back to the database.
50733339,"834","834 ","005010X279A1","N","Y","007977163","0001 ",30,"2110D ","EB ","EB007 ","2 ","Conditional Required Data Element Miss
ing... (3 Replies)
I have this structure:
col1 col2 col3 col4 col5
27 xxx 38 aaa ttt
2 xxx 38 aaa yyy
1 xxx 38 aaa yyy
I need to collapse duplicate lines ignoring column 1 and add values of duplicate lines (col1) so it will look like this:
col1 col2 col3 col4 col5
27 xxx 38 aaa ttt ... (3 Replies)
Hi all,
I'm looking for a way (sed or awk) to delete multiple lines between blank lines containing two patterns ex:
user: alpha
parameter_1 = 15
parameter_2 = 1
parameter_3 = 0
user: alpha
parameter_1 = 15
parameter_2 = 1
parameter_3 = 0
user: alpha
parameter_1 = 16... (3 Replies)
Discussion started by: ce9888
3 Replies
LEARN ABOUT SUSE
flipdiff
FLIPDIFF(1) Man pages FLIPDIFF(1)NAME
flipdiff - exchange the order of two incremental patches
SYNOPSIS
flipdiff [[-p n] | [--strip-match=n]] [[-U n] | [--unified=n]] [[-d PAT] | [--drop-context=PAT]] [[-q] | [--quiet]] [[-z] | [--decompress]]
[[-b] | [--ignore-space-change]] [[-B] | [--ignore-blank-lines]] [[-i] | [--ignore-case]] [[-w] | [--ignore-all-space]]
[--in-place] diff1 diff2
flipdiff {[--help] | [--version]}
DESCRIPTION
flipdiff exchanges the order of two patch files that apply one after the other. The patches must be "clean": the context lines must match
and there should be no mis-matched offsets.
The swapped patches are sent to standard output, with a marker line ("=== 8< === cut here === 8< ===") between them, unless the --in-place
option is passed. In that case, the output is written back to the original input files.
OPTIONS -p n, --strip-match=n
When comparing filenames, ignore the first n pathname components from both patches. (This is similar to the -p option to GNU patch(1).)
-q, --quiet
Quieter output. Don't emit rationale lines at the beginning of each patch.
-U n, --unified=n
Attempt to display n lines of context (requires at least n lines of context in both input files). (This is similar to the -U option to
GNU diff(1).)
-d pattern, --drop-context=PATTERN
Don't display any context on files that match the shell wildcard pattern. This option can be given multiple times.
Note that the interpretation of the shell wildcard pattern does not count slash characters or periods as special (in other words, no
flags are given to fnmatch). This is so that "*/basename"-type patterns can be given without limiting the number of pathname
components.
-i, --ignore-case
Consider upper- and lower-case to be the same.
-w, --ignore-all-space
Ignore whitespace changes in patches.
-b, --ignore-space-change
Ignore changes in the amount of whitespace.
-B, --ignore-blank-lines
Ignore changes whose lines are all blank.
-z, --decompress
Decompress files with extensions .gz and .bz2.
--in-place
Write output to the original input files.
--help
Display a short usage message.
--version
Display the version number of flipdiff.
LIMITATIONS
This is only been very lightly tested, and may not even work. Using --in-place is not recommended at the moment.
There are some cases in which it is not possible to meaningfully flip patches without understanding the semantics of the content. This
program only uses complete lines that appear at some stage during the application of the two patches, and never composes a line from parts.
Because of this, it is generally a good idea to read through the output to check that it makes sense.
AUTHOR
Tim Waugh <twaugh@redhat.com>
Package maintainer
patchutils 23 January 2009 FLIPDIFF(1)