Please Help quickly


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Please Help quickly
# 1  
Old 05-22-2012
Please Help quickly

Hello everyone!
I am new here and by new i don't mean only in this place, but in this shell scripting area. I started learning about Operation Systems only 2 months ago.
I want to learn more but i found a problem which I don't really know how to solve. Smilie
I have a directory with 4 different files in it [file1, file2, file 3, file 4] . One of those files contains only pictures with the extension .jpg and other file contains only numbers.
I want to know how to find the file which has the photos and view its name and to find the folder with the numbers and calculate their average.
In the end can you tell me how to copy the 4 files in a new file in the same directory and then delete those 4 and keep that only new one.
I need your help!Smilie
Thank you!
# 2  
Old 05-22-2012
I'd love to help, but the admins would get mad if I did your homework for free. Smilie

There is a forum for homework. We'd also rather see you learn than to be spoon fed. So what have you tried?

Try again: Homework & Coursework Questions - The UNIX and Linux Forums

Edit: After reading: Forum Rules and the homework rules: Rules for Homework & Coursework
This User Gave Thanks to neutronscott For This Post:
# 3  
Old 05-22-2012
Find files named jpg
Code:
find . -name '*.jpg'

Find files ending in [0-9]

Code:
find . -name '*[0-9]'

This User Gave Thanks to Corona688 For This Post:
Login or Register to Ask a Question

Previous Thread | Next Thread

7 More Discussions You Might Find Interesting

1. Solaris

Service is restarting too quickly

Hi guys, one of my services in solaris 10 is in maintenance mode. When I checked why, the reason is that the service is "restarting too quickly." # svcs -x svc:/application/management/snmpdx:default svc:/application/management/snmpdx:default (Sun Solstice Enterprise Master Agent) State:... (2 Replies)
Discussion started by: cjashu
2 Replies

2. Shell Programming and Scripting

Performing lookup quickly

Hello, Have been trying to develop a script that reads a string from an input file then looks up that string in a reference file to get a number, then inset that number back into the original file at a certain point (_____): Input File: HARRY JON _____ AA M N PETER PIE ... (8 Replies)
Discussion started by: dendright
8 Replies

3. UNIX for Dummies Questions & Answers

changing directory quickly without cd ..

Hi, I am in /home/development/project/abc directory. Now I want to remove one file which is kept in /trial/dev/<file> directory. I would like to do it in one command. I tried changing directory in one command like: pwd /home/development/project/abc cd ~/trial/dev/ bash: no command... (2 Replies)
Discussion started by: palak08
2 Replies

4. Shell Programming and Scripting

Removing tmp file too quickly?

Still trying to get the basics down and I would like a different solution to what I'm currently doing and a better understanding of why it's happening. I've written a simple backup script that tars individual directories and then dumps them to a NFS drive. STDERR is being dumped into a process... (2 Replies)
Discussion started by: mandelbrot333
2 Replies

5. UNIX for Dummies Questions & Answers

need solution for this quickly. please quickly.

Write a nawk script that will produce the following report: ***FIRST QUARTERLY REPORT*** ***CAMPAIGN 2004 CONTRIBUTIONS*** ------------------------------------------------------------------------- NAME PHONE Jan | ... (5 Replies)
Discussion started by: p.palakj.shah
5 Replies

6. AIX

Root partition fills up very quickly

Hi, I have an AIX 4.3 H80 running oracle 8i. My /(ROOT) partion is mounted seperately from others (/usr, /var, /tmp, etc) However, the partion fills up almost nightly. Appreciate any ideas that'll help solve my problem. Thank you. (1 Reply)
Discussion started by: svjn
1 Replies

7. Shell Programming and Scripting

please help quickly..

I want to pass arguments to a sh program and I want to use these arguments in the program as variables? Will I use argc and argv in a main function can anyone around me write the full code please for example when I write in th command sh myprogram.sh argument1 argument2 I want to use... (1 Reply)
Discussion started by: walnut
1 Replies
Login or Register to Ask a Question