Find the answer to your Linux question:
Results 1 to 5 of 5
Ok so here they are: 1. How do you read from a txt file and print to a txt file. 2. how do you check if a file is the ...
  1. #1
    Just Joined!
    Join Date
    Dec 2011
    Posts
    7

    Bash scripting questions

    Ok so here they are:
    1. How do you read from a txt file and print to a txt file.
    2. how do you check if a file is the same as another one?

  2. #2
    Trusted Penguin jayd512's Avatar
    Join Date
    Feb 2008
    Location
    Kentucky
    Posts
    4,071
    1:
    Code:
    cat file_name > other_name
    2:
    Never had to do it... but diff seems likely.
    Code:
    man diff
    Jay

    New users, read this first.
    New Member FAQ
    Registered Linux User #463940
    I do not respond to Private Messages asking for Linux help. Please, keep it on the public boards.

  3. #3
    Just Joined!
    Join Date
    Dec 2011
    Posts
    7
    thanks but the first question was separated how do you read from a file
    how do yu print to a file?

  4. #4
    Linux Guru Irithori's Avatar
    Join Date
    May 2009
    Location
    Munich
    Posts
    2,100
    Yes, and that is exactly what jayd512´s oneliner does.

    Look up
    Code:
    man cat
    and redirections
    You must always face the curtain with a bow.

  5. #5
    Just Joined!
    Join Date
    Dec 2011
    Posts
    7
    thanks for the replys

Posting Permissions

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