How can I remove a line from a file?

how ca i remove one or more than one line from a text file?

Open the file for input.
Open another file for output.
Read each input line.
If you want to delete it, go get the next line
Otherwise, write the line to output, and go get the
next line.
Close both files.

Similar Messages

  • How can I remove one page from adobe file

    How can I remove one page from adobe file, when I try to remove the page a dialgue box say "some pages are being used, so they can not be ereased"?

    Tools>Pages>Delete pages

  • How can i remove a line from an ordinary text file?

    It is easy to remove a line from a file by rewriting the file. how can i remove a line without rewriting ? Also, do not use whitespaces to overwrite the line. I expect a perfect line deletion code .....

    gimbal2 wrote:
    hsc71 wrote:
    It's the way you communicate. Try to be carefull with the words you use in your post. It's easy to insult people just by choosing the wrong words. Bold text and capitals is equal to shouting.
    shock. You said "wrong words". I am seriously offended by that!
    Seriously, would you care that I am offended? I really hope not... Say what you want, people will find reasons to take offense one way or the other.Hehe, maybe you're right, but the OP still has no answer.............and in the end that's what he/she is looking for.

  • How can I remove ReadOnly flag from a file?

    Hellow All!
    I have read/write access for a file, and after using setReadOnly() method in my program I cannot turn the attribute of the file back.
    How can I do that operation in my program?

    Maybe you can go to the directory and runtime
    Runtime.getRuntime().exec("attrib file.txt -r"); //Win32 systems onlyCorrespondingly,
    +r adds read only
    +h hidden
    +s system
    -s remove system etc...

  • How can I remove a line from Familybase?

    I want to remove my wife's ipad from Verizon Familybase, but I can;t figure out how to do it.  Does anyone know how?

    Nevermind.  Before it made me chose either Parent or Child for my wife's ipad under the Profile section.  This caused me to not be able to see my son's data usage on the control screen.  Now all of a sudden, it allowed me to not choose either Parent or Child for my wife's ipad, thus clearing the way to see my son's data usage on the controls screen (It only lets you see the 1st 3 devices listed)

  • How can I remove people tags from MULTIPLE images in Organizer 13?

    How can I remove people tags from MULTIPLE images in Organizer 13?  The strategy for removing keyword tags does not work. It appears that keyword tags and People tags are considered something completely different in 13.  I highlight multiple images, right click, and under keyword tags it says there are no keyword tags. There does not appear to be an option for people or other tags. Can anyone help? It is going to take literally hundreds of hours for me to do this one photo one tag at a time.  ??

    Comp. 792 wrote:
    Hi, my linked images all have dashed lines at the bottom of the images. I searched for an answer and someone said to add:
    img a {text-decoration:none:}
    to the end of my CSS,
    That CSS is complete nonsense. The correct way to remove borders from around links is here: http://forums.adobe.com/thread/417110.
    If you want to get rid of dotted lines, they are almost certainly caused by the outline property. However, outlines around links are there for a reason: it provides a visual "you are here" clue to people who navigate the web with the keyboard, either through preference or because of disability. You shouldn't remove the dotted outline without providing a different visual clue.

  • How can we remove the commas from the Formula value in SAP BW BEx query

    Hi All,
    How can we remove the commas from the Formula value in SAP BW BEx query
    We are using the formula replacing with characteristic.The characteristic value needs to be display as number with out commas.
    Regards
    Venkat.

    Do you want to remove the commas when you run the query on Bex Web or in RSRT?
    Regards

  • How can i remove a card from iTunes ?

    How can i remove a card from iTunes ?

    If you want to remove a credit/debit card from your account then on your computer's iTunes you should be able to edit your payment info by going into the Store > View Account menu option and logging into your account, and on your account's details page there should be a payment link.  If you are doing it on your iOS device then tap on your id in Settings > iTunes & App Store and tap on 'View Apple ID' on the popup and log into your account  - that should also give you a payments link on your account's page.
    Changing payment info : Change or remove your payment information from your iTunes Store account (Apple ID)
    If you don't get the 'none' option on the payment details screen : Why can’t I select None when I edit my Apple ID payment information?

  • HT202667 how can I remove credit card from apple id ?

    i don't want to use apple id with credit card anymore i purchased enough apps for my apple device so now i wanna remove it so how can i remove credit card from apple id

    On your computer's iTunes you should be able to edit your payment info by going into the Store > View Account menu option and logging into your account, and on your account's details page there should be a payment link.  If you are doing it on your iPhone then tap on your id in Settings > iTunes & App Store and tap on 'View Apple ID' on the popup and log into your account  - that should also give you a payments link on your account's page.
    Changing payment info : http://support.apple.com/en-gb/HT1918
    If you don't get the 'none' option on the payment details screen : http://support.apple.com/en-gb/TS5366

  • How can I remove credit card from itunes account?

    How can I remove credit card from itunes account?

    I'm not home right now, so don't have iTunes here. I am basing this on having to do this a few days ago, as well as pictures from Google Images, so things may have different names now...
    Store (dropdown at top of iTunes screen)>View my account>Edit Payment Information>In the list of types of credit cards, the one at the far right says "None." Click that.

  • How can I remove some themes from Keynote??

    How can I remove some themes from Keynote??

    What a co-incidence... I just deleted those same goodies. They were in /Library/Application Support/Keynote-folder on my machine. I just deleted the whole folder, cause there seemed to be nothing more but those downloaded files. And Keynote worked great afterwards. There seemed to be another folder for iWork09, which is not to be removed.

  • HT5622 We have two iphones with the same Apple ID. Since I installed iOS this morning I have started receiving all my sons texts and when I send him a text it is delivered to both of us. How can I remove my phone from the joint Apple ID and remove myself

    My son and I both have iphones with the same Apple ID. Since I installed iOS this morning I have started receiving all my sons texts and when I send him a text it is delivered to both of us. How can I remove my phone from the joint Apple ID and remove myself from finding out what he is up to during Freshers week!

    You have to use a different Apple ID for your son.
    Read this note:
    iOS 5 & iCloud Tips: Sharing an Apple ID With Your Family
    still valid for ios 7

  • I have lost my phone IMEI  Number 012546005322381, Serial Number 87******A4S, is there a way it can be tracked? Also, how can one remove the device from the itunes account

    I have lost my phone IMEI  Number 012546005322381, Serial Number 87******A4S, is there a way it can be tracked? Also, how can one remove the device from the itunes account
    <Serial Number Edited By Host>

    If you enabled Find my iPhone then you should use that. If not, I'm afraid you're out of luck for finding it. 
    To manage your devices, go to Your Account in iTunes.

  • How can I remove a device from my iCloud/Apple ID?

    Hi,
    I merged my dad's iphone to my Apple ID a while back because he wants to buy an app and I have some credit left over so I let him used my ID on his device. Apparently, all my contacts, pictures from photo stream, and ical are now also in his device. And all his contacts, pictures, and ical are on mines. How can I remove his device from my icloud and Apple ID WITHOUT deleting anything? Like I just don't want him to get anymore of my reminders and contacts, and pictures? Because I'm afraid taht if I remove his iphone on my icloud, all the pictures/contacts/ical that he took and went to my device too will be deleted because those are some important pictures/contacts/ical?
    I tried to manually delete some of my dad's contacts that was shared on my phone, it turns out that it got deleted on his phone as well and vice versa. How can I just completely cut him off of my icloud and ID without losing any of my and his contacts/pics/etc?

    Dr mizooo_1985 wrote:
    And i didn' erase anything,
    Hope her new BF is not a forensics expert .
      Can she see my icloud-backups???
    Not unless she knows your Apple ID/Password...or her new BF is good at forensics.
    What can i do to prevent icloud-backup to this pc???
    Same as my last answer...good luck.

  • HT201317 How can I remove Photo Stream from my PC?

    How can I remove Photo Stream from my PC?

    Go to the iCloud control panel for windows (Start>Control Panel, search for "iCloud", double-click the iCloud icon), then uncheck Photo Stream.

Maybe you are looking for

  • Mid 2013 macbook air: battery drain / running hot

    Hi there, For the last couple weeks my MBA starts to run hot and drain battery fast if I've been using it for a few hours. I use it a lot on most days and connect to powercord only once it drops down low, like below 20%. Have just seen other posts wh

  • How do I hide the parent folder of the user home folders in File Sharing?

    In 10.6 Server I would set the parent folder so that "Everyone" could not list folder contents, then set "Everyone else" read only.  This prevented the parent folder from showing up in the list of available Share Points and allowing users to see the

  • Opening an idml file in indesign cs5

    I'm trying to open an idml file in cs5 on a mac.  I can't upgrade to cs5.5 without upgrading everything else. When I open the file, I'm not able to see the "high res display" images or the preview images.  Am I missing plugins? or what? Can anyone te

  • Navigation Panel issues in Acrobat X

    Is there a quick way to navigate through PDFs? It used to be you could detach the navigation panel and then have it available; a click and you could jet to the front or back of a document, or the previous view (very useful). Now you have to fish thro

  • Where is the MXParserFactory class ?

    Where do I find com.bea.xml.stream.MXParserFactory ? XMLInputFactory factory = XMLInputFactory.newInstance(); XMLEventReader r = factory.createXMLEventReader(new FileReader(filename)); while(r.hasNext()) { XMLEvent e = r.nextEvent(); System.out.print