The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
.
google unix.com



UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !!

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
delete blank lines from a file sachin.gangadha UNIX for Dummies Questions & Answers 2 12-04-2007 07:13 PM
Delete blank lines at the end of file TL56 Shell Programming and Scripting 3 10-25-2007 04:44 PM
To remove Continous blank spaces from a file in UNIX arunkumar_mca UNIX for Dummies Questions & Answers 1 12-08-2006 01:10 AM
Remove blank lines osymad UNIX for Dummies Questions & Answers 4 08-27-2005 07:41 AM
Blank Lines - End of file saabir Shell Programming and Scripting 4 07-15-2003 12:55 PM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 02-08-2008
hungbp hungbp is offline
Registered User
  
 

Join Date: Feb 2008
Posts: 6
remove blank lines in *.srt file :)

Hi all,
I use translate web to get subtitle file in my langues . But in output file have bad blank lines .
I need scrip (i use debian ) to remove this blank lines .

szintax of my bad *.srt file :

------
number
blank1
number:number ---> number:number
blank2
text1
.
textn
blankS
number
blank1
number:number--->number:number
blank2
text1
.
textn
blankS
..and again...
.....
-----------
can do : remove blank1 and blank2 lines, blankS lines are stay !
thx

Last edited by hungbp; 02-08-2008 at 06:02 PM..
  #2 (permalink)  
Old 02-08-2008
bobbygsk bobbygsk is offline
Registered User
  
 

Join Date: Oct 2007
Posts: 90
sed '/^$/d' infile > outfile
  #3 (permalink)  
Old 02-08-2008
hungbp hungbp is offline
Registered User
  
 

Join Date: Feb 2008
Posts: 6
Quote:
Originally Posted by bobbygsk View Post
sed '/^$/d' infile > outfile
thx for help but this command remove all of blank lines ( I did it too ).
blankS lines must stay !!!
  #4 (permalink)  
Old 02-08-2008
jim mcnamara jim mcnamara is offline Forum Staff  
...@...
  
 

Join Date: Feb 2004
Location: NM
Posts: 5,771
What does blankS stand for? The third blank line...a line with more than 2 blanks?
  #5 (permalink)  
Old 02-08-2008
hungbp hungbp is offline
Registered User
  
 

Join Date: Feb 2008
Posts: 6
Quote:
Originally Posted by jim mcnamara View Post
What does blankS stand for? The third blank line...a line with more than 2 blanks?
blankS is a blank line , but cant remove from srt file . Subtitle file is not work whitout that !
  #6 (permalink)  
Old 02-11-2008
hungbp hungbp is offline
Registered User
  
 

Join Date: Feb 2008
Posts: 6
up...........!
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 10:00 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0