Results 1 to 3 of 3

Thread: A little BASH help please

  1. #1
    Join Date
    Dec 2011
    Location
    Manchester, UK
    Beans
    356
    Distro
    Ubuntu

    A little BASH help please

    Hi.

    I have downloaded a program called ‘Markdown’ from here: http://daringfireball.net/projects/markdown/

    Basically, it's a program that takes a specific plain text input and outputs HTML. I like to write fiction in my spare time and write all my chapters in plain text + its markup and then combine all the files into one for formatting in Sigil.

    Thing is, it's much less hassle-some for me to work with an HTML file rather than manually adding in formatting with Sigil later on. BUT, the program in question gives me the HTML output straight in the terminal – not in a file. I can't find any documentation on how to log the output to a specific file (e.g. ~/Documents/Chapters.html).

    Is there any way to make a bash-script to run the program and log the output to a specific file? I was thinking of coding it straight into the source code of the program, but I don't have any experience with Perl, and I'm no BASH guru
    Read my technology blog at: http://penguincampaigner.wordpress.com

  2. #2
    Join Date
    May 2008
    Beans
    41

    Re: A little BASH help please

    so someting like > output ?
    example : ls > test.txt
    Last edited by Sef; December 2nd, 2012 at 01:52 PM. Reason: Edited post to fit within Ubuntu CoC guidelines

  3. #3
    Join Date
    Dec 2011
    Location
    Manchester, UK
    Beans
    356
    Distro
    Ubuntu

    Re: A little BASH help please

    Quote Originally Posted by Gompa View Post
    so someting like > output ?
    example : ls > test.txt
    Thanks. I figured it out to be:
    Code:
    #!/bin/bash
    /home/username/Software/Markdown_1.0.1/Markdown.pl /home/username/Documents/test.text > /home/username/Documents/test-output.html
    Which seems to be working.
    Last edited by Wild Man; December 2nd, 2012 at 05:01 PM. Reason: Removed inappropriate language.
    Read my technology blog at: http://penguincampaigner.wordpress.com

Tags for this Thread

Bookmarks

Posting Permissions

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