Remove ascii code from a certain position in file

Ask a Question related to Linux / Unix Administration, Design and Development.

  1. #1

    Default Remove ascii code from a certain position in file

    I'm very familiar with the tr command and use it a lot when removing
    certain characters from files, but my situation today is involving
    needing to remove a newline character from a certain area in the
    file.... not all newline characters in the entire file.

    If I had a 100 line file and wanted to state "ONLY Between lines 35
    and 42, remove the newline character", how would I do that? I'm
    thinking this would involve sed, but am unsure about the setup.

    Thanks.
    John Guest

  2. Similar Questions and Discussions

    1. check whether file is ascii or ebcdic
      Hi How do I check whether a file is in ebcdic or ascii format ? Thanks, Nitish
    2. #26300 [Opn->Csd]: PB serialization ascii code greater than 127
      ID: 26300 Updated by: iliaa@php.net Reported By: pierre-marie dot mouliere at arc-intl dot com -Status: Open...
    3. #26300 [NEW]: PB serialization ascii code greater than 127
      From: pierre-marie dot mouliere at arc-intl dot com Operating system: HPUX PHP version: 4.3.3 PHP Bug Type: WDDX related Bug...
    4. ascii code use in urls
      Hi I need to send <CR> within a postNetText call (it's pointing to an asp routine), I've been told that I should send the ascii code for <CR> rather...
    5. Line break ASCII code
      I want to be able to strip line breaks from a string i've imported from a txt file into Director. Does Director have any functions that will do...
  3. #2

    Default Re: Remove ascii code from a certain position in file

    2004-09-3, 06:40(-07), John:
    > I'm very familiar with the tr command and use it a lot when removing
    > certain characters from files, but my situation today is involving
    > needing to remove a newline character from a certain area in the
    > file.... not all newline characters in the entire file.
    >
    > If I had a 100 line file and wanted to state "ONLY Between lines 35
    > and 42, remove the newline character", how would I do that? I'm
    > thinking this would involve sed, but am unsure about the setup.
    Please don't multi-post, your question was already answered in
    comp.unix.questions

    --
    Stephane
    Stephane CHAZELAS Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139