Welcome guest. Before posting on our computer help forum, you must register. Click here it's easy and free.

Author Topic: Unix Shell scripting  (Read 4517 times)

0 Members and 1 Guest are viewing this topic.

nisarg24

    Topic Starter


    Starter

    • Experience: Beginner
    • OS: Unknown
    Unix Shell scripting
    « on: November 29, 2011, 11:15:39 PM »
    Modify the code below so that it will process input file roster to create files for

    everybody in the file. The newly created files name are the first name
    (eg. Guy,Warren's first name is Warren) of each person.

    sed -n                                                                                         file:  mkdb.sd
                /^Hassan,^/ , /^Heep , /  {
                           s / , //p
    }        $1
    while
                      read NAME GARBAGE
    do
                 sed -n  " / $NAME/  {
                  s / [^ :] * / /w   $NAME
    } " $1
    done

    Allan

    • Moderator

    • Mastermind
    • Thanked: 1260
    • Experience: Guru
    • OS: Windows 10
    Re: Unix Shell scripting
    « Reply #1 on: November 30, 2011, 04:06:32 AM »
    I deleted the other post which contained your personal information (including your phone number).

    Salmon Trout

    • Guest
    Re: Unix Shell scripting
    « Reply #2 on: November 30, 2011, 11:45:37 AM »
    Quote
    I deleted the other post which contained your personal information (including your phone number).

    I saw that; I got the impression they were specimen data included in the school assignment he copied and pasted.


    Rob Pomeroy



      Prodigy

    • Systems Architect
    • Thanked: 124
      • Me
    • Experience: Expert
    • OS: Other
    Re: Unix Shell scripting
    « Reply #3 on: December 01, 2011, 02:09:05 AM »
    Nobody RTFMs any more.  :'(
    Only able to visit the forums sporadically, sorry.

    Geek & Dummy - honest news, reviews and howtos