Quick help with UNIX commands (pipes and filters)


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Quick help with UNIX commands (pipes and filters)
# 1  
Old 10-07-2009
Quick help with UNIX commands (pipes and filters)

Hey all, I need a command line that creates a new file named whatever, say stuff.txt in the current working directory which contains the number of directories in the current working directory, followed by the number of empty files in the current working directory, followed by the name of the working directory.

Also, a command line that displays a long listing of the contents of the working directory, sorted by the date the file or directory was last modified, one screen at a time. I can get this one it's just the one screen at a time thing that gets me.


Any help? I know these are done using pipes and filters, but i'm having a lot of trouble.

Thanks
# 2  
Old 10-07-2009
That you're having trouble suggests that you did try something.

What have you tried.

There is nothing in what you've asked that would require the use of pipes.

Last edited by Scott; 10-07-2009 at 09:00 PM.. Reason: I'll correct myself by differentiating between "using a pipe" and "creating a pipe"!
# 3  
Old 10-07-2009
I attempted the second one, i got "ls -lt"
 
Login or Register to Ask a Question

Previous Thread | Next Thread

8 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Vi quick substitution commands

I have a script that has quite a lot of these types of entries: hello=$(who am i) good=$(blahblah) what i want to do is replace the $( and the ) with `` so that they look like this: hello=`who am i` good=`blahblah` I tried this: :%s~=$(&&)$~=`&&`$~g (3 Replies)
Discussion started by: SkySmart
3 Replies

2. Programming

C, unix, pipes, fork, recursion

Hi, I will try to keep my post as compressed as my title was. I am writing on pseudo code on a recursive function that I want to read from the one-above function-run and then give the result to the function-run down below until a stop is triggered. Example: $ ls -la | grep x | sort In my... (2 Replies)
Discussion started by: tarasque
2 Replies

3. UNIX for Dummies Questions & Answers

quick way to get earlier commands?

I used to use a linux system that would allow me to bring up previously-used commands by typing the first (or more) letters of a previous command and then hitting the tab key. It was incredibly useful. Now I've switched to using a mac and it doesn't work. Is there an analog to this for macs? ... (3 Replies)
Discussion started by: ac2011
3 Replies

4. Shell Programming and Scripting

Multiples commands between pipes and a single process

Hi I have this script: #!/bin/ksh cmd1 | cmd 2 |cmd 3| cmd4 which it creates 4 process.... Is possible to create a single process PID1 which include all commands? Thanks Israel (2 Replies)
Discussion started by: iga3725
2 Replies

5. UNIX for Advanced & Expert Users

Unix- filters ppt

Hello.. i want a ppt on unix filters.. can anybody gv me d link 4 that?? (1 Reply)
Discussion started by: shweta_babbar
1 Replies

6. Shell Programming and Scripting

How Unix tee to send pipeline output to 2 pipes ?

Hi, I would like to process, filter the same ASCII asynchronous live data stream in more than one pipe pipeline. So the one pipeline should filter out some records using grep key word and more than one pipes pipelines each should grep for another key words, each set seperately for each... (5 Replies)
Discussion started by: jack2
5 Replies

7. UNIX for Dummies Questions & Answers

what is a filter ? WExplain any five filters in unix

what is a filter ? explain any five filters in unix (1 Reply)
Discussion started by: jobym
1 Replies

8. Filesystems, Disks and Memory

PIPEs and Named PIPEs (FIFO) Buffer size

Hello! How I can increase or decrease predefined pipe buffer size? System FreeBSD 4.9 and RedHat Linux 9.0 Thanks! (1 Reply)
Discussion started by: Jus
1 Replies
Login or Register to Ask a Question