creating a command and sorting???


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers creating a command and sorting???
# 1  
Old 09-30-2009
creating a command and sorting???

How do you write a command line that displays the number of files in the working directory with names that end with the letter S? Thanks

---------- Post updated at 09:34 PM ---------- Previous update was at 09:33 PM ----------

for unix sorry
# 2  
Old 09-30-2009
Code:
ls -1 *s | wc -l

 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Help: Sorting the numbers without using sort command

Hi, I've got two arrays 1 3 5 7 2 4 6 8 and i need to write a shell script to get the output 1 2 3 4 5 6 7 8 without using sort or bubble sort. (1 Reply)
Discussion started by: web2moha
1 Replies

2. Solaris

Monitoring log file for entries - Find command & sorting

hi, I would like to monitor a log file, which rolls over, everytime a server is restarted. I would like to grep for a string, and to be more efficient i'd like to grep only newly appended data. so something like a 'tail -f' would do, however, as the log rolls over i think a 'tail -F' is... (2 Replies)
Discussion started by: horhif
2 Replies

3. Shell Programming and Scripting

sed sorting command explanation

sed '$!N; /^\(.*\)\n\1$/!P; D' i found this file which removes duplicates irrespective for sorted or unsorted file. keep first occurance and remove the further occurances. can any1 explain how this is working.. i need to remove duplicates following file. duplicate criteria is not the... (3 Replies)
Discussion started by: mukeshguliao
3 Replies

4. HP-UX

Sorting top command output in HP_UX 11.11

Hello all, I've been woking on Solaris and Linux (Red Hat) so far but now I've inherited an HP-UX system and having minor issues with syntax...Appreciate if you could help me out here.. 1) I'm trying to sort the output of the top command in HP-UX 11.11 by pressing O (capital O) after typing... (2 Replies)
Discussion started by: luft
2 Replies

5. Shell Programming and Scripting

faster command than find for sorting?

I'm sorting files from a source directory by size into 4 categories then copying them into 4 corresponding folders, just wondering if there's a faster/better/more_elegant way to do this: find /home/user/sourcefiles -type f -size -400000k -exec /bin/cp -uv {} /home/user/medfiles/ \; find... (0 Replies)
Discussion started by: unclecameron
0 Replies

6. UNIX for Dummies Questions & Answers

Help with Data Sorting Command

Hi, I have a problem on data sorting, example my file as below: 123 123/789 aaa bbb ccc ddd (adf) 112 112/123 aaa bbb ccc (ade) 102 1a3/7g9 (adf)03 110 12b/129 aaa bbb ccc ddd fff(a8f)03 117 42f/8c9 aaa bbb ccc ddd (adf) 142 120/tyu fff... (7 Replies)
Discussion started by: 793589
7 Replies

7. UNIX for Dummies Questions & Answers

Unix Top Command and sorting by CPU Usage

Ok, so I am using the Top command on my linux VPS to try and see the processes using the most CPU %. I hit the P to sort by CPU % but it wants to sort them from lowest to highest (ascending). My Telnet-SSH screen is only about 60 rows high so the processes with the highest CPU % usage are at the... (6 Replies)
Discussion started by: davemehta
6 Replies

8. UNIX for Dummies Questions & Answers

sorting files with find command before sending to text file

i need help with my script.... i am suppose to grab files within a certain date range now i have done that already using the touch and find command (found them in other threads) touch -d "$date_start" ./tmp1 touch -d "$date_end" ./tmp2 find "$data_location" -maxdepth 1 -newer ./tmp1 !... (6 Replies)
Discussion started by: deking
6 Replies

9. Shell Programming and Scripting

Help in sorting echo command

Hi, I have a simple question on bash. If i printed out something like below echo -e $q"\t\t\t"$r"\t\t\t"$s"\t\t\t"$u"\t\t\t" |sort -r >>test.txt It cant able to sort the $q value. I tried on -nr option but still the same. For your info, the $q value is actually a floating point. I would... (3 Replies)
Discussion started by: ahjiefreak
3 Replies

10. UNIX for Advanced & Expert Users

comm command in sorting IP

i have 2 files that contains a sorted list of IP addresses. file_A contains a list of all IPs file_B contains only around 50% of what is in file_A. I tried to execute comm -23 file_A file_B > file_C to get the difference. My objective is to put all the IPs that are in file_A but not... (1 Reply)
Discussion started by: tads98
1 Replies
Login or Register to Ask a Question