Find the answer to your Linux question:
Results 1 to 2 of 2
Hello. Im want to write a script which empty lines for text. I want to as where i made a mistake. Code: #!/bin/bash echo Enter file name read x a=$(sed ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Sep 2011
    Posts
    6

    script deletes empy lines


    Hello. Im want to write a script which empty lines for text. I want to as where i made a mistake.
    Code:
    #!/bin/bash
    echo Enter file name
    read x
    a=$(sed '/^$/d' "$x")
    "$a" > "$x"

  2. #2
    Super Moderator Roxoff's Avatar
    Join Date
    Aug 2005
    Location
    Nottingham, England
    Posts
    3,906
    It is difficult to understand what you are asking for here. I take it your first language isn't English? Your question isn't easy to read.

    I'd also like to remind you that you are not allowed to ask homework questions here.
    Linux user #126863 - see http://linuxcounter.net/

Posting Permissions

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