Find the answer to your Linux question:
Results 1 to 2 of 2
Hi, I am new to bash scripting. I need to acomplish below objectives. Directory X contains some files e.g. "123_HH:MM D:MM:YYYY.pst" etc, script should check in directory /a/b whether directory ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Mar 2007
    Posts
    1

    need help on bash script


    Hi,
    I am new to bash scripting.

    I need to acomplish below objectives.

    Directory X contains some files e.g. "123_HH:MMD:MM:YYYY.pst" etc,

    script should check in directory /a/b whether directory 123 (number before _ in above example) and if yes should move the file after renaming it to /a/b/123/ HH:MMD:MM:YYYY.pst (removing leading numers). If directory does not exist then it should create one and then move files after renaming.

    Your help is appreciated.

    Regards,
    Divakar.

  2. #2
    Super Moderator devils casper's Avatar
    Join Date
    Jun 2006
    Location
    Chandigarh, India
    Posts
    24,729
    HI Divakar,

    sorry. HomeWork questions are not allowed here. its against Forum Rules. i am locking this thread.
    Feel free to ask any Linux related non-homework questions here. we will try our best to help you.
    It is amazing what you can accomplish if you do not care who gets the credit.
    New Users: Read This First

Posting Permissions

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