DaniWeb IT Discussion Community

DaniWeb IT Discussion Community (http://www.daniweb.com/forums/index.php)
-   Shell Scripting (http://www.daniweb.com/forums/forum113.html)
-   -   Linux Bash Script (http://www.daniweb.com/forums/thread107619.html)

AlvinRey70 Feb 4th, 2008 5:53 pm
Linux Bash Script
 
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.

eggi Feb 5th, 2008 2:22 am
Re: Linux Bash Script
 
Hey there,

1.

#!/bin/bash
#
# your name
# your course

ls >FILE.txt

2.

#!/bin/bash
#
# your name
# your course

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

DimaYasny Feb 5th, 2008 4:57 am
Re: Linux Bash Script
 
you didn't even try to conceal this is a homework assignment...

chris5126 Feb 13th, 2008 5:31 am
Re: Linux Bash Script
 
lol u just did his homework for him!!

eggi Feb 13th, 2008 9:23 pm
Re: Linux Bash Script
 
:) Yeah - Every once and a while, I like an easy one :)

Who loses? ;)

, Mike

Templeofjava Nov 24th, 2008 10:02 am
Re: Linux Bash Script
 
Quote:

Originally Posted by eggi (Post 534801)
:) Yeah - Every once and a while, I like an easy one :)

Who loses? ;)

, Mike

I gained something from it...learn something new everyday!:cool:

moqwen Jan 14th, 2009 12:54 pm
Re: Linux Bash Script
 
Do your home work. Spend some time on the
linux bash shell scripting guide.


All times are GMT -4. The time now is 10:17 am.

Forum system based on vBulletin Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
©2003 - 2009 DaniWeb® LLC