Name: the666th Date: October 11, 2007 at 12:09:55 Pacific Subject: batch empy lines removal OS: windows xp professional CPU/Ram: 1.25gb
Comment:
hello, I work often with text files that contains this structure: " text and numbers
text and numbers
text and numbers
................
text and numbers"
etc...and I need to remove the two empty lines from between the text and numbers lines...I don't know any programming so if u could serve the script on a plate would be nice :D
I'm sorry if I may sound stupid...I dont know what programming sintax is that u use here, but I assumed is vbs...I made a file with the code u gave me here modified the name of my text file in what is stated in these scripts and changed its extension to .vbs but I get errors on both...On IVO's code I get "Expected Identifier" at line 2 char 5 code"800A03F2", and at tonysathre's "Expected end of statement" at line 1 char 13 code "800A0401". So I would be very very greatful if u'd tell me what to do step by step as to a totally noob...thanx for being kind enough to help
Tonysathre's tip is just one command to be entered at command prompt after you changed the folder to that holding your file (by issuing CD C:\....path of filename).
My (IVO) is a batch script not a VBS one, so it have to be suffixed by .bat (e.g. X.bat).
Run it first changing folder as for tonysathre's command then type X.
It's hard however to drive a plane without no knowledge of flying. BTW The666 was my old ID for computing account at University time.
Thanx a bunch IVO, it works :D Thank you, thank you, thank you, thank you, thank you...
But I'm wondering if it can be done without the necessity of a fixed txt file name, or to change the txt file name within the batch file...if that's not too troublesome ---------------------- Off topic...I don't know why or what signification The666 had for you , but my "the666th" is always written in small letters and it means a person wich isn't the first the2nd or any other elite persons it's number 666 wich has a satanic connotation, but is not based on it to much and the fact that is also written in small letters says more about his insignificant valor...and with all this he still is a feared person, something like fear of the unknown :D
About The666: That was THE666 as at that time only uppercase chars were allowed (punched cards for UNIVAC 1108) and yes 666 was the satanic signature as I was nicknamed Dr. Strangelove (do you get it), but that is another story.
Ok, thanx for sharing your knowledge with others...you really helped me a lot.
------------ Off topic...I didn't really get it because I don't know who Dr.Strangelove was...if it's related with Stanley Kubrick's movie I'll read a review or even watch the movie.
Dr. Strangelove I refer to is Kubrick's carachter in same titled movie. He was a mad scientist tailored from Edward Teller, the real scientist who developed the H bomb.
I was so nicknamed due to the huge stress my code produced to the very powerfull UNIVAC.
as you quoted, the cards were punched using IBM 029 equipment and control statements marked by @ in first column (e.g. "@FOR IS,MAIN") had to be punched by stopping the card to advance by hand and typing "7/8" (key 7 and 8 in sequence). Not to say students' runs were skeduled during night shift...
I'm painfully glad to come from those days: the moon, the nuclear power, the future were at your hand; you actually was feeling to be on the border of the impossible. And when you went out from the computer room, there always was a nice girl to spend together the late hours of night. Shortly I WAS YOUNG as young I feel today too..
The information on Computing.Net is the opinions of its users. Such
opinions may not be accurate and they are to be used at your own risk.
Computing.Net cannot verify the validity of the statements made on this site. Computing.Net and Computing.Net, LLC hereby disclaim all responsibility and liability for the content of Computing.Net and its accuracy.
PLEASE READ THE FULL DISCLAIMER AND LEGAL TERMS BY CLICKING HERE