10-22-2012
Quote:
Originally Posted by
elixir_sinari
Drop the -r option.
Arrrrrrrrrrrgh
Thanks a lot, I think it's time for going home.......
Ronald
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Data I want to sort :-
1 10 jj Y
2 100 vv B
19 5 jj A
1 11 hq D
3 8 op X
44 78 ds GG
1 8 hq D
and want to sort based on the first 2 columns - which hold numeric values.
Am using :
cat filename | sort -nk 1,2
But the result is :-
1 10 jj Y
1 11 hq D (1 Reply)
Discussion started by: sinpeak
1 Replies
2. Shell Programming and Scripting
hi all,
i'm very new to scripting and have the folllowing issue. I have used a few commands to get a list of numbers, but I need to strip away the non-numeric ones, and then need a total of all values. any ideas?
root@unixserver # cat myfile | awk '{print $8}'| sort -rn
1504
1344
896
704... (2 Replies)
Discussion started by: badoshi
2 Replies
3. Shell Programming and Scripting
Hello all,
I am working on a basic script but need a little help.
Issue:
I am running a SQL Query using sqlplus and a shell script. I have the output of the statement stored as variable $A. $A is set to "other text here 45678754 other text here". I need to strip all text except that numeric... (13 Replies)
Discussion started by: ownedthawte
13 Replies
4. Programming
I am getting back on the C++ programming after many years away. I recently received an SDK that has code like this where numeric values end in 'U'. What does this mean?
if ((ptr % 16U) == 0U)
return buffer; (3 Replies)
Discussion started by: sneakyimp
3 Replies
5. Shell Programming and Scripting
How to check if the file contains only numeric values.
I don't want to read entire file it eats lot of cpu
Or any way which consumes less memory n cpu..
Please suggest
-S (2 Replies)
Discussion started by: sunilmenhdiratt
2 Replies
6. Shell Programming and Scripting
Dear all,
I have a inputfile like some what like this -
1000.98651
1000.96696
999.98904
991.66864
986.51829
986.49467
17.44122
16.74039
16.74021
10.92725
desired output
1000.98651
1000.96696
0999.98904 (4 Replies)
Discussion started by: admax
4 Replies
7. Shell Programming and Scripting
Hi,
I would like to do the following sorting, but the output is not what i expected. Why 222 and 2222 are not at the last two elements of array?
awk 'BEGIN{a="22";a="2222";a="33";a="44";a="222";a="11";a="22";a="33";asort(a); for (i=1;i<=8;i++) print a}'
11
22
22
222
2222
33
33
44... (1 Reply)
Discussion started by: phoeberunner
1 Replies
8. Shell Programming and Scripting
Hi All
I've got a perl script that I'm having a problem with when it prints the output of a hash. Some background. I'm trying to merge two file with a similar structure but with different data. Here is a portion of the script I'm using.
while (<INPUT>) {
my... (0 Replies)
Discussion started by: kingpin2502
0 Replies
9. Shell Programming and Scripting
Hi,
I use UBUNTU 12.04.
I have a file with this structure:
Name 2 1245787 A G 12 14 12 14 ....
Name 1 1245789 C T 13 12 12 12.....
I would like to sort my file based on the second column so to have this output for example:
Name 1 1245789 C T 13 12 12 12.....
Name 2 1245787 A G 12 14... (4 Replies)
Discussion started by: Homa
4 Replies
10. UNIX for Beginners Questions & Answers
Hi All,
I am trying to replace a certain value from one place in a file . In the below file at position 35 I will have 8 I need to modify all 8 in that position to 7
I tried
awk '{gsub("8","7",$35)}1' infile > outfile ----> not working
sed -i 's/8/7'g' infile --- it is replacing all... (3 Replies)
Discussion started by: arunkumar_mca
3 Replies
WALL(1) Linux User's Manual WALL(1)
NAME
wall -- send a message to everybody's terminal.
SYNOPSIS
wall [-n] [ message ]
DESCRIPTION
Wall sends a message to everybody logged in with their mesg(1) permission set to yes. The message can be given as an argument to wall, or
it can be sent to wall's standard input. When using the standard input from a terminal, the message should be terminated with the EOF key
(usually Control-D).
The length of the message is limited to 20 lines. For every invocation of wall a notification will be written to syslog, with facility
LOG_USER and level LOG_INFO.
OPTIONS
-n Suppresses the normal banner printed by wall, changing it to "Remote broadcast message". This option is only available for root if
wall is installed set-group-id, and is used by rpc.walld(8).
ENVIRONMENT
Wall ignores the TZ variable - the time printed in the banner is based on the system's local time.
SEE ALSO
mesg(1), rpc.rwalld(8).
AUTHOR
Miquel van Smoorenburg, miquels@cistron.nl
15 April 2003 WALL(1)