Page 2 of 3 FirstFirst 123 LastLast
Results 11 to 20 of 21

Thread: Please will somebody write me a bash script.

  1. #11
    Join Date
    Jun 2007
    Location
    Maryland, US
    Beans
    6,288
    Distro
    Kubuntu

    Re: Please will somebody write me a bash script.

    Quote Originally Posted by ron999 View Post
    Bump again.

    I need some help here.
    How can you expect anyone to help you? So far...

    1. You have failed to answer all of the questions posed concerning your assignment? For example, where does (do) the company address(es) come from?

    2. You have not really indicated if this is for a homework assignment;

    3. The code you presented contradicts some of the requirements (ie. those related to the hash marks) indicated in your opening post.

    The assignment you have is really trivial; almost sounds like a class exercise. Thus I hope your BS skills are up to par and you can entertain us when you attempt to answer item 2 above.

  2. #12
    Join Date
    Sep 2005
    Beans
    1,596
    Distro
    Ubuntu Mate 20.04 Focal Fossa

    Re: Please will somebody write me a bash script.

    Here's another hint:

    You need to read each line from the file.
    MBA M1 - M1 8GB 256GB - macOS Monterey
    MSI GL65 - i5-10300H 16GB 512GB GTX 1650 Windows 11
    Galaxy Book Go - Snapdragon 7c Gen 2 4GB 128GB Windows 11

  3. #13
    Join Date
    Jul 2006
    Location
    Lancashire
    Beans
    Hidden!
    Distro
    Ubuntu 11.04 Natty Narwhal

    Re: Please will somebody write me a bash script.

    Thanks for nuthin' community.

    [SOLVED]

  4. #14
    Join Date
    Jun 2007
    Location
    Maryland, US
    Beans
    6,288
    Distro
    Kubuntu

    Re: Please will somebody write me a bash script.

    Quote Originally Posted by ron999 View Post
    Thanks for nuthin' community.

    [SOLVED]
    You are most welcome!

  5. #15
    Join Date
    Jun 2006
    Beans
    2,930

    Re: Please will somebody write me a bash script.

    Quote Originally Posted by dwhitney67 View Post
    The assignment you have is really trivial; almost sounds like a class exercise. Thus I hope your BS skills are up to par and you can entertain us when you attempt to answer item 2 above.
    This is probably why the OP deleted his posts.
    Support 7z in default installs!!!: Click Here

    How to use code blocks to post command output: Click Here
    Official Ubuntu Documentation

  6. #16
    Join Date
    Dec 2009
    Beans
    Hidden!

    Thumbs down Re: Please will somebody write me a bash script.

    Quote Originally Posted by ron999 View Post
    .
    copy this to your gedit and save it your home folder as the name "wtf":

    #!/bin/bash
    # This is a bash script
    firefox http://en.wikipedia.org/wiki/Bash
    echo " Note to self....Google is my friend"
    ext 0

    Now right click the file in your home folder and set the permission to "allow this to run as a program"
    OR... in your terminal type chmod +x wtf

    in your terminal type:

    ./wtf

    enjoy
    Last edited by d3v1150m471c; January 15th, 2010 at 05:16 AM.

  7. #17
    Join Date
    Feb 2007
    Beans
    2,339
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: Please will somebody write me a bash script.

    I pretty sure the point has been made. There is no need to rub it in.

  8. #18
    Join Date
    Dec 2009
    Beans
    Hidden!

    Re: Please will somebody write me a bash script.

    hey at least i provided what he wanted. secondly, "hello world" is lame.

  9. #19
    Join Date
    Jun 2007
    Location
    Paraparaumu, New Zealand
    Beans
    Hidden!

    Re: Please will somebody write me a bash script.

    Quote Originally Posted by ron999 View Post
    Thanks for nuthin' community.

    [SOLVED]
    You're welcome!
    I wish to voice curiosity on behalf of everyone who might come by this thread who didn't the original question (now edited out), as to what it was and how it was solved.
    (I saw the original question and could probably have managed something in C or BASIC that accomplished the task)
    Forum DOs and DON'Ts
    Please use CODE tags
    Including your email address in a post is not recommended
    My Blog

  10. #20
    Join Date
    Jun 2006
    Beans
    2,930

    Re: Please will somebody write me a bash script.

    Quote Originally Posted by lisati View Post
    You're welcome!
    I wish to voice curiosity on behalf of everyone who might come by this thread who didn't the original question (now edited out), as to what it was and how it was solved.
    (I saw the original question and could probably have managed something in C or BASIC that accomplished the task)
    Thanks to google:
    Hi
    Please will somebody write me a bash script to run in Ubuntu.
    This is the requirement:-

    I have a text file containing a list of names. The number of entries isn't known, it will vary from day to day.
    I want to generate another text file containing a reader-friendly report.

    The name of the original file is foo1.txt.
    The name of the generated file is to be foo2.txt.

    The top line of the report is to be a heading Clients.
    Then there will be 2 spare lines containing # symbols.

    Then there will be a list of clients' names.
    In front of each name will be his title Mr.
    Following each name will be the letter P to show that he's paid his bill.

    At the bottom of the list will be 2 more spare lines containing # symbols.
    Then there will be 3 lines of text showing the company's mailing address.

    For example:-

    foo1.txt

    Quote:
    Smith
    Jones
    Harris
    Brown
    foo2.txt

    Quote:
    Clients
    #
    #
    Mr Smith P
    Mr Jones P
    Mr Harris P
    Mr Brown P
    #
    #
    Acme Ltd
    London
    England
    Support 7z in default installs!!!: Click Here

    How to use code blocks to post command output: Click Here
    Official Ubuntu Documentation

Page 2 of 3 FirstFirst 123 LastLast

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
  •