LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Help me with write program linux (https://www.linuxquestions.org/questions/linux-newbie-8/help-me-with-write-program-linux-4175561047/)

learnlinuxvn 12-09-2015 08:43 AM

Help me with write program linux
 
1. Write a program that displays a list of the subdirectories of a directory
- $ Subdir path
- List the subdirectory located in the path.
2.
Write a program that searches files in one folder 1 ( but not in folders
alcohol)
- $ Search path ten_tep

pan64 12-09-2015 08:49 AM

we will gladly help you, but will not write that (homework?) for you. What have you done so far, where did you stuck?

suicidaleggroll 12-09-2015 08:50 AM

Quote:

Originally Posted by learnlinuxvn (Post 5461886)
1. Write a program that displays a list of the subdirectories of a directory
- $ Subdir path
- List the subdirectory located in the path.
2.
Write a program that searches files in one folder 1 ( but not in folders
alcohol)
- $ Search path ten_tep

No

YOU do your homework and ask us specific problems when you run into trouble. Do not post homework questions verbatim and expect us to do your work for you. This is the third post in a row where you've done that.

berndbausch 12-09-2015 08:50 AM

I will write them for you, 100 Euro a piece. Which language?

Or you start writing, and if it doesn't work or you hit a brick wall, describe your problem, and I and many others will help for free.

See also the LQ Rules http://www.linuxquestions.org/linux/rules.html, especially the part about homework:

Quote:

Do not post homework assignments verbatim. We're happy to assist if you have specific questions or have hit a stumbling point, however. Let us know what you've already tried and what references you have used (including class notes, books, and searches) and we'll do our best to help. Keep in mind that your instructor might also be an LQ member.

szboardstretcher 12-09-2015 02:16 PM

This isn't even requesting a program - its requesting a command be made into a program. Also, not sure what the second request even means.

Code:

read -p "What directory do you want to list the subdirectories of: " directory;
find $directory -type d;


TB0ne 12-09-2015 02:48 PM

Quote:

Originally Posted by szboardstretcher (Post 5462039)
This isn't even requesting a program - its requesting a command be made into a program. Also, not sure what the second request even means.
Code:

read -p "What directory do you want to list the subdirectories of: " directory;
find $directory -type d;


The OP posted three threads similar to this. All of them asking for blatant handouts/homework.

jamison20000e 12-09-2015 06:11 PM

LOL
 
Read a book and you know what that book said. Now rewriting that book or telling it's topic (in your own words) is a different story... :jawa:
http://www.linuxquestions.org/questi...4/#post5049376

JJJCR 12-09-2015 07:31 PM

Quote:

Originally Posted by berndbausch (Post 5461897)
I will write them for you, 100 Euro a piece. Which language?

Or you start writing, and if it doesn't work or you hit a brick wall, describe your problem, and I and many others will help for free.

See also the LQ Rules http://www.linuxquestions.org/linux/rules.html, especially the part about homework:

100 Euro per character? Hmm..good business.. LOL..

Homework link reference (for a start): http://www.unix.com/shell-programmin...directory.html

Try to do things yourself if you bump somewhere then shout for help. Shortcut will get you nowhere. Study and learn.

rtmistler 12-10-2015 07:56 AM

@OP Please check this link Welcome to LQ


All times are GMT -5. The time now is 08:47 PM.