Submitted Questions

  • Want to delete the record if I find a word (dd)in the fixed length(5-7).

    Want to delete the record if I find a word (dd)in the length(5-7). Lets think that (5-7) length is FF2. This is a fixed width file. ex f1 ff1 ff2 ff3 sds dd fd sd ss ew dd dd se o/p should be like ff1 ff2 ff3 sd ss ew

    pranav Rakesh

    • Sep 26th, 2017

    Sed /[dD]$/d file

    shailesh chanderiya

    • Aug 26th, 2017

    Line_no=` sed -n /^...*dd/=;p temp | sed -n /^[0-9]/p |xargs|sed s/ /d;/g;s/$/d/`
    sed -i "${line_no}" temp