Trouble in Sorting

Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Trouble in Sorting
# 1  
Old 02-23-2014
Trouble in Sorting

[][9 ,14 ,4 ,23]

[4,9,14,23] []

can i do it using simple perl script/awk?

Last edited by sa@@; 02-26-2014 at 11:16 PM..
# 2  
Old 02-23-2014
Define what 'right side' means. Using the fields backwards, using the whole line in reverse order?
# 3  
Old 02-23-2014
Given :[][9 ,14 ,4 ,23]
i hope am not confusing ..
[4,9,14,23] []

Last edited by sa@@; 02-26-2014 at 11:17 PM..
# 4  
Old 02-23-2014
Is this a homework assignment?
# 5  
Old 02-23-2014
its part of a main code which in some point should call in this function
# 6  
Old 02-23-2014
What be the difference compared to a plain ascending sort?
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Ps commands trouble

Hi, i am writing a bash file and need to list the command name and user for the busiest process ie the one using the greatest percentage of CPU time) im kind of stuck. i know you should get the highest CPU , sort column 3 then take off the head but i'm un sure how would i do that? echo... (2 Replies)
Discussion started by: ryoukii
2 Replies

2. Programming

trouble with delimiter

Hi all, I have a flat file storing data like this, Testing, What I'm trying to do is to retrieve the data "1", "2" and "3". So far I manage retrieve the data by using the code below, while (getline(file, line)) { if (line.find("Testing")!=string::npos) ... (5 Replies)
Discussion started by: vinzping
5 Replies

3. Shell Programming and Scripting

while condition with trouble

Hello! i have a llittle missunderstanding with a script and maybe you can explain where is the mistake. in the first place a have this script that is working just fine ... read -p "enter the name of the instance: " instance while ; .... but if i change the second condition with -z "`grep... (2 Replies)
Discussion started by: doro
2 Replies

4. Programming

Trouble with C

Hey, i am having a problem First, i know java well and i have used C++ on occasion so i thought i would be able to deal with a class where they program in C. unfortunately i have hit some speed bumps that i am having problems. Here is my problem: I have a structure cache_t in the sample... (0 Replies)
Discussion started by: zephoid
0 Replies

5. Shell Programming and Scripting

Trouble sorting numbers embedded

Hi All, First time poster. I have a text file that as many entries like below (single line): egrep RspTime conlb.txt |more S( Hits(13358983, 2/sec, P) ATr(2) Mbps(0.07) BWlmt(0 kbits) RspTime(16.50 ms) ... I am trying to sort on the RspTime from highest to lowest... (4 Replies)
Discussion started by: mycrew2008
4 Replies

6. UNIX for Dummies Questions & Answers

X trouble

Hi there, I'm new to unix-environments. I'm richard, and i'm mostly a web-developer, under php. I've done work in unix env before, but never had my own. Today, I've got debian 3.1 r4 from the official site, and i've attempted to install it twice. I installed it initially as "Desktop... (0 Replies)
Discussion started by: izua
0 Replies

7. Solaris

Trouble with tr

I'm not sure where to post this but it's happening on a SunOS 5.8 server so I'll try here. I've discovered some unexpected behavior when using tr. For example: echo a | tr Z echo b | tr a echo a | tr B echo a | tr B echo a | tr A (8 Replies)
Discussion started by: Mike@Work
8 Replies

8. UNIX for Dummies Questions & Answers

The trouble about SU ...

Hi all, having read lots of posts about SU I don't quiet understand this : I'm doing regular backups of my database (u betta do) and therefore use su - username -c "sqlscript special data_base" in a unixscript which is even using cron. (yep!) Now I need some other script, still with this... (4 Replies)
Discussion started by: nulnul7
4 Replies

9. What is on Your Mind?

The trouble with...

Welcome to "The trouble with...." with your host, ZazzyBob. Todays offering - "The trouble with letting other people host your website" I use a certain web hosting service, who shall of course remain nameless here. They are running PHP 4.3.10 I decide to write a script to test their PHP... (6 Replies)
Discussion started by: zazzybob
6 Replies

10. UNIX Desktop Questions & Answers


Hello, The system reboots in single user mode what command to use to bring the system up regularly?? I get INIT: cannot create /var/adm/utmpx Type control -d to proceede with a normal startup or give root passwd for system maintaince. either way i don't have a change and ... (1 Reply)
Discussion started by: awk
1 Replies
Login or Register to Ask a Question