943,581 Members | Top Members by Rank

Ad:
Feb 4th, 2008
-1

Linux Bash Script

Expand Post »
Can someone please help me with the following questions.

1) Create a script that will produce a text file that has a list of the files in the present working directory. Ensure you use the proper syntax to allow auto-execution from the command prompt.

Use internal documentation (comments) to place your name and the course name in the script.

2) Create a Bash script that will copy all the files in one directory to another directory. You may name the receiving directory anything you like. Ensure you use the proper syntax to allow auto-execution from the command prompt.

Use internal documentation (comments) to place your name and the course name in the script.
Similar Threads
Reputation Points: 9
Solved Threads: 0
Newbie Poster
AlvinRey70 is offline Offline
4 posts
since Feb 2008
Feb 5th, 2008
-1

Re: Linux Bash Script

Hey there,

1.

Shell Scripting Syntax (Toggle Plain Text)
  1. #!/bin/bash
  2. #
  3. # your name
  4. # your course
  5.  
  6. ls >FILE.txt

2.

Shell Scripting Syntax (Toggle Plain Text)
  1. #!/bin/bash
  2. #
  3. # your name
  4. # your course
  5.  
  6. cp -r dir/* newdir/*

Don't forget to chmod them at least 700 so they can be executed from the command line.

Best wishes,

, ike
Reputation Points: 102
Solved Threads: 47
Posting Whiz
eggi is offline Offline
399 posts
since Oct 2007
Feb 5th, 2008
0

Re: Linux Bash Script

you didn't even try to conceal this is a homework assignment...
Moderator
Featured Poster
Reputation Points: 183
Solved Threads: 89
Posting Virtuoso
DimaYasny is offline Offline
1,772 posts
since Jan 2007
Feb 13th, 2008
0

Re: Linux Bash Script

lol u just did his homework for him!!
Reputation Points: 38
Solved Threads: 15
Posting Pro in Training
chris5126 is offline Offline
412 posts
since Feb 2006
Feb 13th, 2008
0

Re: Linux Bash Script

Yeah - Every once and a while, I like an easy one

Who loses?

, Mike
Reputation Points: 102
Solved Threads: 47
Posting Whiz
eggi is offline Offline
399 posts
since Oct 2007
Nov 24th, 2008
0

Re: Linux Bash Script

Click to Expand / Collapse  Quote originally posted by eggi ...
Yeah - Every once and a while, I like an easy one

Who loses?

, Mike
I gained something from it...learn something new everyday!
Reputation Points: 10
Solved Threads: 0
Newbie Poster
Templeofjava is offline Offline
1 posts
since Nov 2008
Jan 14th, 2009
0

Re: Linux Bash Script

Do your home work. Spend some time on the
linux bash shell scripting guide.
Last edited by moqwen; Jan 14th, 2009 at 12:56 pm. Reason: forgot link
Reputation Points: 10
Solved Threads: 0
Newbie Poster
moqwen is offline Offline
1 posts
since Jan 2009

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in Shell Scripting Forum Timeline: Comparing two folder
Next Thread in Shell Scripting Forum Timeline: some useful ksh commands





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC