Linux Bash Script

Reply

Join Date: Feb 2008
Posts: 4
Reputation: AlvinRey70 is an unknown quantity at this point 
Solved Threads: 0
AlvinRey70 AlvinRey70 is offline Offline
Newbie Poster

Linux Bash Script

 
-1
  #1
Feb 4th, 2008
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.
Reply With Quote Quick reply to this message  
Join Date: Oct 2007
Posts: 399
Reputation: eggi will become famous soon enough eggi will become famous soon enough 
Solved Threads: 47
eggi eggi is offline Offline
Posting Whiz

Re: Linux Bash Script

 
-1
  #2
Feb 5th, 2008
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
Linux and Unix Tips, Tricks and Individual Advice - The Linux and Unix Menagerie!
------------------------------------------------------------------------
The greatest viral marketing idea of all time, get your copy of this Free Report now!
Reply With Quote Quick reply to this message  
Join Date: Jan 2007
Posts: 1,756
Reputation: DimaYasny will become famous soon enough DimaYasny will become famous soon enough 
Solved Threads: 85
Featured Poster
DimaYasny DimaYasny is offline Offline
Posting Virtuoso

Re: Linux Bash Script

 
0
  #3
Feb 5th, 2008
you didn't even try to conceal this is a homework assignment...
Real stupidity always beats Artificial Intelligence. (Terry Pratchett)

BA BizMg, MCSE, DCSE, Linux+, Network+
Reply With Quote Quick reply to this message  
Join Date: Feb 2006
Posts: 399
Reputation: chris5126 is an unknown quantity at this point 
Solved Threads: 14
chris5126 chris5126 is offline Offline
Posting Whiz

Re: Linux Bash Script

 
0
  #4
Feb 13th, 2008
lol u just did his homework for him!!
If my post helped add to my rep!
Reply With Quote Quick reply to this message  
Join Date: Oct 2007
Posts: 399
Reputation: eggi will become famous soon enough eggi will become famous soon enough 
Solved Threads: 47
eggi eggi is offline Offline
Posting Whiz

Re: Linux Bash Script

 
0
  #5
Feb 13th, 2008
Yeah - Every once and a while, I like an easy one

Who loses?

, Mike
Linux and Unix Tips, Tricks and Individual Advice - The Linux and Unix Menagerie!
------------------------------------------------------------------------
The greatest viral marketing idea of all time, get your copy of this Free Report now!
Reply With Quote Quick reply to this message  
Join Date: Nov 2008
Posts: 1
Reputation: Templeofjava is an unknown quantity at this point 
Solved Threads: 0
Templeofjava Templeofjava is offline Offline
Newbie Poster

Re: Linux Bash Script

 
0
  #6
Nov 24th, 2008
Originally Posted by eggi View Post
Yeah - Every once and a while, I like an easy one

Who loses?

, Mike
I gained something from it...learn something new everyday!
Reply With Quote Quick reply to this message  
Join Date: Jan 2009
Posts: 1
Reputation: moqwen is an unknown quantity at this point 
Solved Threads: 0
moqwen moqwen is offline Offline
Newbie Poster

Re: Linux Bash Script

 
0
  #7
Jan 14th, 2009
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
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC