08-31-2004
you are right sorry about that.
how to awk, to print the lines with integers only, having random patterns.
from:
qwerty
12345
asdfg
56789
zxcvb
00001
58364
22222
will be:
12345
56789
00001
58364
22222
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Hi,
I have an expression using grep and nawk that captures the ID number of a given Unix process. It gets printed to screen but I don't know how to declare a variable to this returned value!
For example,
ps -ef|grep $project | grep -v grep | nawk '{print $2}'
This returns my number. How... (2 Replies)
Discussion started by: babariba
2 Replies
2. Shell Programming and Scripting
Hi,
I am trying to write a script to extract multiple sets of data from a chemistry output file. The problem section is in the following format...
Geometry "geometry" -> "geometry"
1 Pd 46.0000 -0.19290971 0.00535260 0.02297606
2 P ... (7 Replies)
Discussion started by: smadonald1
7 Replies
3. UNIX for Dummies Questions & Answers
Srr for being pain her
let say i have a data in a file like this
1@1000
2@2000
4@4000
5@7770
6@8998
7@80008
i am a newbie in Unix
i need to add a comma to integer using AWK function. for example, 1,000 or 80,008
how can i do that
ps. i'm using bash shell (1 Reply)
Discussion started by: Nutter
1 Replies
4. Shell Programming and Scripting
I need to extract a value from a text file into a ksh script, and change the last two letters to "00". awk gets the right value (2500 in this example), but the variable has no value.
I use the following command:
StartTime=expr nawk 'NR==20 {print $11;exit}' $New_FILE
echo 1 $StartTime... (4 Replies)
Discussion started by: Iliklev
4 Replies
5. Shell Programming and Scripting
Hi, I am having the following number in the file tmp
31013.004
20675.336
43318.190
30512.926
48992.559
277893.111
41831.330
8749.113
415980.576
28273.054
I want to add these numbers, I am using following script
awk 'END{print s}{s += $1}' tmp
its giving answer 947239 which is correct,... (3 Replies)
Discussion started by: chaitubek
3 Replies
6. UNIX Desktop Questions & Answers
hey, i have a list of devices that looks like so:
VolumeTask(DeviceName(DeviceName(DeviceNameInfo(MultiPathType_UID(Option<GUDeviceID>(GUDeviceID(ulonglong(358271365120608989UL))),Option<ulong>())))),2098560),... (5 Replies)
Discussion started by: boaz733
5 Replies
7. Shell Programming and Scripting
I would like to extract a number from $0 and calculate if it can be devided by 25. Though the number can also be less then 25 or bigger than 100. How do i extract the number and how can the integer be calculated?
String:
"all_results">39</span>I am looking for the number between "all_results"> ... (5 Replies)
Discussion started by: sdf
5 Replies
8. Shell Programming and Scripting
I have an input file
12.4 1.72849432773174e+01 -7.74784188610632e+01
12.5 9.59432114416327e-01 -7.87018212757537e+01
15.6 5.20139995965960e-01 -5.61612429666624e+01
29.3 3.76696387248366e+00 -7.42896194101892e+01
32.1 1.86899877018077e+01 -7.56508762501408e+01
35 6.98857157014640e+00... (2 Replies)
Discussion started by: chrisjorg
2 Replies
9. UNIX for Dummies Questions & Answers
---------- Post updated at 01:58 PM ---------- Previous update was at 01:48 PM ----------
For some reason my question is not getting printed. Here are the details:
Greetings.
I would like to add/subtact an integer to/from two columns of integers. I feel like this should be easy using awk... (3 Replies)
Discussion started by: Twinklefingers
3 Replies
10. Shell Programming and Scripting
Hi,
0.23 2.94% 0.00 0.00% 17.8G 55.7% 19.6G 40.9% 630 0.00%
0.06 0.77% - - 7524M 22.9% 15.6G 32.6% - -
From the above sample output. I need to compare whether the 6th field is more than 10G..if so print the entire line. Here the 6th field is memory
TIA (5 Replies)
Discussion started by: Sumanthsv
5 Replies
LEARN ABOUT DEBIAN
rds-gen
RDS-GEN-SINK(1) BSD General Commands Manual RDS-GEN-SINK(1)
NAME
rds-gen -- write data from a file to an RDS socket
rds-sink -- write data from an RDS socket to a file
SYNOPSIS
rds-gen [-s source_address:source_port] [-d destination_address:destination_port] [-f input_file] [-m message_size] [-l total_bytes]
[-i interval]
rds-sink [-s listen_address:listen_port] [-f output_file] [-i interval]
DESCRIPTION
The rds-gen and rds-sink utilities are used to stream data through RDS sockets. rds-gen reads data from a file descriptor and sends it as
messages down an RDS socket. rds-sink receives messages from an RDS socket and writes it to a file descriptor.
The following options are shared between rds-gen and rds-sink:
-s address:port
Binds the RDS socket to the given address and port. rds-gen will send messages from this address and port. rds-sink will receive
messages sent to this address and port.
-f file
rds-gen will read data from this file and rds-sink will write data to this file. If '-' is given as the filename then rds-gen will
use standard input and rds-sink will use standard output.
-i interval_seconds
An iterative summary of the number and size of messages that are sent and received is written to standard error at this interval.
In addition, rds-gen supports the following options:
-d address:port
Messages are sent to this destination address and port. If this option is specified multiple times then the messages are sent to
each destination address in a round-robin fashion.
-m message_size
Specifies the size of the messages that are sent down the RDS socket. The default message size is 4k. The message size must not be
greater than the buffer size.
-l total_bytes
Specifies the number of bytes that will be sent out the socket before rds-gen exits. If this is not specified and rds-gen was given
a source file then it will run until it gets EOF from the file. If no file was given and this option is not specified then rds-gen
will send data indefinitely.
EXAMPLES
rds-gen on host src sends infinite data to rds-sink on dest who prints out the amount of data it receives every second.
$ rds-sink -s dest:22222 -i 1
$ rds-gen -s src:11111 -d dest:22222
Read 100M from /dev/zero on src and write it to /dev/null on dest, printing stats on both sides every minute.
$ rds-sink -s dest:22222 -f /dev/null -i 60
$ rds-gen -s src:11111 -f /dev/zero -d dest:22222 -i 60
Watch rds-gen write data as fast as it can into a local black hole because there is no bound receiving socket.
$ rds-gen -s src:11111 -d localhost:31337 -i 1
BSD
October 30, 2006 BSD