03-28-2008
Hi,
I made a mistake earlier. It should be sorting on the fourth field rather than the first field.
echo -e $q"\t\t\t"$r"\t\t\t"$s"\t\t\t"$u"\t\t\t" >>test.txt
means i wanted to sort $u.
Input file:
62 5377 143 0.02590
661 0 0 0
60 5377 143 0.02590
659 5377 143 0.02590
658 5377 143 0.02590
657 0 0 0
56 200 0 0.000000
55 5377 143 0.02590
654 0 0 0
53 5377 143 0.02590
652 0 0 0
51 0 0 0
Output line
661 0 0 0
657 0 0 0
654 0 0 0
652 0 0 0
51 0 0 0
62 5377 143 0.02590
60 5377 143 0.02590
659 5377 143 0.02590
658 5377 143 0.02590
55 5377 143 0.02590
53 5377 143 0.02590
Thanks.
10 More Discussions You Might Find Interesting
1. UNIX for Advanced & Expert Users
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
2. UNIX for Dummies Questions & Answers
Hi,
Good morning. Would you please explain to me what does it mean by the following command.
echo "$$ $# $@" >> /opt/ftp_generic_send.log
I know that something is being directed to log file, but not sure what exactly mean by those $$ and $# and $@ means.
Thank you for your help.... (3 Replies)
Discussion started by: howdy
3 Replies
3. UNIX for Dummies Questions & Answers
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 (1 Reply)
Discussion started by: jorogon0099
1 Replies
4. UNIX for Dummies Questions & Answers
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
5. Shell Programming and Scripting
Can anybody tell me what does following command do?
# echo gsoc1 | ./configure_cmd.sh
Regards,
akash mahakode (1 Reply)
Discussion started by: akash_mahakode
1 Replies
6. UNIX for Dummies Questions & Answers
Hi
I tried giving the following command
echo $$a
I got an output like 32178a
Can some one please explain why echo $$ is returning 32178
Thanks in advance (6 Replies)
Discussion started by: Sri3001
6 Replies
7. Shell Programming and Scripting
Hi All
I want to use the echo command to had some lines to a file but the lines i want to have contain " and ;
here is my command
system("echo user_pref("accessibility.typeaheadfind.flashBar", 0); > $profile");
but i think there are too many " and so it barfs
n e ideas
thanks
A (5 Replies)
Discussion started by: ab52
5 Replies
8. Shell Programming and Scripting
can someone please tell me who to sort the numerical output of echo?
UIO="8180 0 0 0 0 0 0 0 0 0 0 48240 48240 48240 48240 48240 48240 0 0 0 0 0 0 0 48300 0 0 0 48300"
echo $UIO | sort -n
This doesn't workk. it does not sort the numbers from smallest to highest. any ideas? (2 Replies)
Discussion started by: SkySmart
2 Replies
9. UNIX for Dummies Questions & Answers
Hi All
I have the big statement which needs to be appended to the file MANUALLY without opening the file.
So, i tried with echo command
echo " failure ( 4446): for host xx.xx.xx.xxx trying to GET /index.html, wl-proxy reports: exception occurred for backend host 'xx.xx.xxx.xx/12210/12210':... (11 Replies)
Discussion started by: Kalaiela
11 Replies
10. Shell Programming and Scripting
Hello,
I have written a command n shell script :
srvctl relocate service -d t1 -s s1 -i i1 -t t1 -f
If the above command executes successfully without error I need to echo
"Service relocated successfully
and If it errors out I need to trap the errors in a file and also need to make... (1 Reply)
Discussion started by: Vishal_dba
1 Replies
LEARN ABOUT PHP
imap_setflag_full
IMAP_SETFLAG_FULL(3) 1 IMAP_SETFLAG_FULL(3)
imap_setflag_full - Sets flags on messages
SYNOPSIS
bool imap_setflag_full (resource $imap_stream, string $sequence, string $flag, [int $options = NIL])
DESCRIPTION
Causes a store to add the specified $flag to the flags set for the messages in the specified $sequence.
PARAMETERS
o $
imap_stream -An IMAP stream returned by imap_open(3).
o $sequence
- A sequence of message numbers. You can enumerate desired messages with the X,Y syntax, or retrieve all messages within an inter-
val with the X:Y syntax
o $flag
- The flags which you can set are Seen, Answered, Flagged, Deleted, and Draft as defined by RFC2060.
o $options
- A bit mask that may contain the single option:
o ST_UID - The sequence argument contains UIDs instead of sequence numbers
RETURN VALUES
Returns TRUE on success or FALSE on failure.
EXAMPLES
Example #1
imap_setflag_full(3) example
<?php
$mbox = imap_open("{imap.example.org:143}", "username", "password")
or die("can't connect: " . imap_last_error());
$status = imap_setflag_full($mbox, "2,5", "\Seen \Flagged");
echo gettype($status) . "
";
echo $status . "
";
imap_close($mbox);
?>
SEE ALSO
imap_clearflag_full(3).
PHP Documentation Group IMAP_SETFLAG_FULL(3)