10-06-2005
help me to remove the whitespaces between the lines ...urgent
Hello all,
i have a problem.
please help me to remove the white spaces and tabs betweeen line.
i.e.,
file1 contains some text..
text starts_hdsffdsd
sdfsddssdds********
sdfsdsd***********
sdfsdsdfsdsdfsdsds***
****fsd_test_ends
one or 2 blank lines
(* indicates white spaces or tabs)
please help me to remove all blank line and white spaces.
my final file should contain entire text in a single line. like as follows.
text starts_hdsffdsdsdfsddssddssdfsdsdsdfsdsdfsdsdfsdsdssdfsd_test_ends
waitng for ur reply.
Kumar
9 More Discussions You Might Find Interesting
1. Solaris
HI all,
I would like to know, how we can remove a package?
I know that pkgrm will do the job ,but specifying the right kinda package is important..
And i dont know how to figure that one out?
Eg:if i have installed a pkg called virtualbox,
If i do,
pkgrm SUNWvirtualbox ,it says "no such file... (2 Replies)
Discussion started by: wrapster
2 Replies
2. UNIX for Dummies Questions & Answers
Hello all,
I am a unix dummy. I am trying to remove spaces between fields. I have the file in the following format
12332432, 2345 , asdfsdf ,100216 , 9999999
12332431, 2341 , asdfsd2 ,100213 , 9999999
&... (2 Replies)
Discussion started by: nitinbjoshi
2 Replies
3. Shell Programming and Scripting
I assume removing whitespaces in the n first characters of a string would be an easy task for sed? If so, how? (7 Replies)
Discussion started by: KidCactus
7 Replies
4. Shell Programming and Scripting
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)
Discussion started by: dvah
11 Replies
5. UNIX for Dummies Questions & Answers
Hi
I have got a XML file which has got content as follows:
<FUNCall81110000 Tag="81110000" CallDate="25/08/11" CallTime="00:03:22" TotalUsageValue="30" MeasurementUnit="1"/>
I want to remove TotalUsageValue="30" only
and TotalUsageValue="XXXXX"
here XXX can be any value. (1 Reply)
Discussion started by: muchyog
1 Replies
6. UNIX for Dummies Questions & Answers
URGENT HELP IS NEEDED!!
I am looking to move matching lines (01 - 07) from File1 and 77 tab the matching string from File2, to File3.txt. I am almost done but
- Currently, script is not printing lines to File3.txt in order.
- Also the matching lines are not moving out of File1.txt
... (1 Reply)
Discussion started by: High-T
1 Replies
7. Post Here to Contact Site Administrators and Moderators
Hi Sir,
There is an escalation going on this and could you please remove the words from the following link .
this is really critical.
https://www.unix.com/shell-programming-and-scripting/196647-remove-headings.html
please remove following terms
fiappl17dev
fiappl18dev ... (1 Reply)
Discussion started by: ptappeta
1 Replies
8. Shell Programming and Scripting
I have been searching and trying to come up with an awk that will perform the following on a
converted text file (original is a pdf).
1. Since the first two lines are (begin with) text they are removed
2. if $1 is a number then all text is merged (combined) into one line until the next... (3 Replies)
Discussion started by: cmccabe
3 Replies
9. UNIX for Beginners Questions & Answers
Hello All,
I have a pipe delimited file and below is a sample data how it looks:
CS123 | | || 5897 | QXCYN87876
As stated above, the delimited files contains sometimes only spaces as data fields and sometimes there are extra spaces before/after numeric/character data fields. My requirement... (4 Replies)
Discussion started by: amvip
4 Replies
DIFF(1) General Commands Manual DIFF(1)
NAME
diff - differential file comparator
SYNOPSIS
diff [ -efbwr ] file1 ... file2
DESCRIPTION
Diff tells what lines must be changed in two files to bring them into agreement. If one file is a directory, then a file in that directory
with basename the same as that of the other file is used. If both files are directories, similarly named files in the two directories are
compared by the method of diff for text files and cmp(1) otherwise. If more than two file names are given, then each argument is compared
to the last argument as above. The -r option causes diff to process similarly named subdirectories recursively. The normal output con-
tains lines of these forms:
n1 a n3,n4
n1,n2 d n3
n1,n2 c n3,n4
These lines resemble ed commands to convert file1 into file2. The numbers after the letters pertain to file2. In fact, by exchanging `a'
for `d' and reading backward one may ascertain equally how to convert file2 into file1. As in ed, identical pairs where n1 = n2 or n3 = n4
are abbreviated as a single number.
Following each of these lines come all the lines that are affected in the first file flagged by `<', then all the lines that are affected
in the second file flagged by `>'.
The -b option causes trailing blanks (spaces and tabs) to be ignored and other strings of blanks to compare equal. The -w option causes
all white-space to be removed from input lines before applying the difference algorithm.
The -e option produces a script of a, c and d commands for the editor ed, which will recreate file2 from file1. The -f option produces a
similar script, not useful with ed, in the opposite order. It may, however, be useful as input to a stream-oriented post-processor.
Except in rare circumstances, diff finds a smallest sufficient set of file differences.
FILES
/tmp/diff[12]
SOURCE
/sys/src/cmd/diff
SEE ALSO
cmp(1), ed(1)
DIAGNOSTICS
Exit status is the empty string for no differences, for some, and for trouble.
BUGS
Editing scripts produced under the -e or -f option are naive about creating lines consisting of a single `.'.
When running diff on directories, the notion of what is a text file is open to debate.
DIFF(1)