![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Forum Rules | FAQ | Contribute | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts here. |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| How to remove a pkg ,urgent!! | wrapster | SUN Solaris | 2 | 05-11-2008 12:43 AM |
| remove lines from file | bluemoon1 | Shell Programming and Scripting | 9 | 11-08-2007 10:40 PM |
| vi to remove lines in file | kjbaumann | UNIX for Dummies Questions & Answers | 1 | 10-03-2007 12:25 PM |
| How to remove all lines with something other than numbers | Juha | Shell Programming and Scripting | 2 | 09-21-2006 01:48 PM |
| Remove blank lines | osymad | UNIX for Dummies Questions & Answers | 4 | 08-27-2005 03:41 AM |
|
|
Submit Tools | LinkBack | Thread Tools | Display Modes |
|
#1
|
|||
|
|||
|
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 |
| Forum Sponsor | ||
|
|
|
#2
|
|||
|
|||
|
Hi,
Try this command Code:
grep -v '^$' remove_wp.txt | sed -e 's/ //g' -e 's/ //g' | sed 'N;N;s/\n//g' -Mons |
|
#3
|
||||
|
||||
|
Code:
tr -d '\n\t ' < kumar.txt vino |
|
#4
|
|||
|
|||
|
hai ,
use regexp u can remove the unnecessary blank space |
|
#5
|
|||
|
|||
|
Dear Friends,
thanks for ur replis, it will be a great help if u solve the following problem I am using csplit to split the files, i.e., csplit -f filetype_ -n 3 filename '/regexpn/' {5} which will split file "filename" into 5 subfiles filetype_000 filetype_001 filetype_002 filetype_003 filetype_004 but if I run the csplit commad again it will rewrite the previous subfiles. What I need is to continue with existing files i.e., if I run the csplit command, it should continue to split files and produce follwoing subfiles filetype_005 filetype_006 filetype_007 filetype_008 filetype_009 do not affecting filetype_000 filetype_001 filetype_002 filetype_003 filetype_004 and finally I should have filetype_000 filetype_001 filetype_002 filetype_003 filetype_004 filetype_005 filetype_006 filetype_007 filetype_008 filetype_009 please tell me how do I proceed. Thanks in advance, Kumar |
|
#6
|
||||
|
||||
| Google The UNIX and Linux Forums |