Sponsored Content
Top Forums UNIX for Dummies Questions & Answers Use awk to change an IP format Post 302768459 by MrEddy on Friday 8th of February 2013 03:03:42 PM
Old 02-08-2013
Awesomeness thanks! works like a charm
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

change the empty function from the old format to the new format

I have about 300 files which has the function getDBBackend(). How to write a program to change the empty function from the old format to the new format? Old empty function format are either: function getDBBackend() { // Not available } // getDBBackend or: function... (0 Replies)
Discussion started by: powah
0 Replies

2. Shell Programming and Scripting

awk,cut fields by change field format

Hi Everyone, # cat 1.txt 1321631,77770132976455,19,20091001011859,20091001011907 1321631,77770132976455,19,20091001011859,20091001011907 1321631,77770132976455,19,20091001011859,20091001011907 # cat 1.txt | awk -F, '{OFS=",";print $1,$3,$4,$5}' 1321631,19,20091001011859,20091001011907... (7 Replies)
Discussion started by: jimmy_y
7 Replies

3. Shell Programming and Scripting

How can I change is output format by awk ?

Hello, Can you tell me how can I change this format by awk Input 0.2057422D-01 0.2463722D-01 -0.1068047D-02 Output 0.02057422 0.02463722 -0.001068047 Thanks wan (8 Replies)
Discussion started by: wanchem
8 Replies

4. Shell Programming and Scripting

using awk or bash to change the format

tenxun-glibc_code-x86-64-linux-20120713190049.root.tar.bz2 To tenxun-glibc_code-x86-64-linux.root.tar.bz2 (3 Replies)
Discussion started by: yanglei_fage
3 Replies

5. Shell Programming and Scripting

Change a file content format using awk

Hi, i have a file input.txt Continent North America Country USA Capital Washington D.C. Country Canada Capital Ottawa Continent South America Country Argentina Capital Buenos Aires Country Brazil Capital Brasília Coutry Colombia Capital Bogotá and i want to get an output.txt ... (3 Replies)
Discussion started by: fastlane3000
3 Replies

6. Shell Programming and Scripting

awk - change date format

I have below date format in a CSV file. (dd/mm/yyyy) Ex Input: 9/8/2013 Need to convert it into below format (yyyymmdd ) and redirect to new file. Ex Output: 20130809 How do I use awk here to change the format and if leading 0 (zero) is not then add it. Please help. Thanks. (8 Replies)
Discussion started by: vegasluxor
8 Replies

7. UNIX for Dummies Questions & Answers

Des/awk for change format and adding integers in a column of data?

Greetings! I need a quick way to change the format in a table of data Here is an example of the input: 10 72 Value=177 VDB=0.0245 Value4=0,0,171,0 10 274 Value=238 VDB=0.0433 Value4=29,0,205,0 10 312 Value=222 VDB=0.0384 Value4=8,0,190,19 10 540 Value=405 VDB=0.0391 Value4=13,30,153,195... (3 Replies)
Discussion started by: Twinklefingers
3 Replies

8. Shell Programming and Scripting

Datestamp format 2nd change in csv file (awk or sed)

I have a csv file formatted like this: 2014-08-21 18:06:26,A,B,12345,123,C,1232,26/08/14 18:07and I'm trying to change it to MM/DD/YYYY HH:MM for both occurances. I have got this: awk -F, 'NR <=1 {print;next}{"date +%d/%m/%Y\" \"%H:%m -d\""$1 "\""| getline dte;$1=dte}1' OFS="," test.csvThis... (6 Replies)
Discussion started by: say170
6 Replies

9. Shell Programming and Scripting

Need to change date format in a csv file using awk

Example: Input csv file 00245DLS,Sitel Ocala,12/31/2014,18:45,1.00,7.00,0.00,0.00 00245DLS,Sitel Ocala,12/31/2014,19:00,-1.00,-1.00,-1.00,-1.00 00245HB,Charlotte,01/01/2015,00:00,-1.00,-1.00,-1.00,0.00 Output csv file 00245DLS,Sitel Ocala,2014/12/31,18:45,1.00,7.00,0.00,0.00 00245DLS,Sitel... (8 Replies)
Discussion started by: adit
8 Replies

10. UNIX for Beginners Questions & Answers

Date format conversion how to change this from using nawk to awk

Hi, I have a file where I need to change the date format on the nth field from DD-MM-YYYY to YYYY-MM-DD so I can accurately sort the record by dates From regex - Use sed or awk to fix date format - Stack Overflow, I found an example using nawk. Test run as below: $: cat xyz.txt A ... (2 Replies)
Discussion started by: newbie_01
2 Replies
UDP-RECEIVER(1) 						      Udpcast							   UDP-RECEIVER(1)

NAME
udp-receiver - receive files broadcast by udp-sender SYNOPSIS
./udp-receiver [--file file] [--pipe pipe] [--portbase portbase] [--interface net-interface] [--log file] [--ttl time-to-live] [--mcast-rdv-address mcast-rdv-address] [--nokbd] [--exitWait milliseconds] [--stat-period n] [--print-uncompressed-position flag] DESCRIPTION
"Udp-receiver" is used to receive files sent by "udp-sender" (for instance a disk image). OPTIONS
Basic options --file file Writes received data to file. If this parameter is not supplied, received data is written to stdout instead. --pipe command Sends data through pipe after receiving it. This is useful for decompressing the data, or for filling in unused filesystem blocks that may have been stripped out by udp-sender. The command gets a direct handle on the output file or device, and thus may seek inside it, if needed. "Udpcast" itself also keeps a handle on the file, which is used for an informational progress display. The command's stdin is a pipe from udp-receiver. Example: "udp-receiver -p "gzip -dc"" --log file Logs some stuff into file. --nosync Do not open target in synchronous mode. This is the default when writing to a file or a pipe. --sync Write to target in synchronous mode. This is the default when writing to a device (character or block) --nokbd Do not read start signal from keyboard, and do not display any message telling the user to press any key to start. --start-timeout sec receiver aborts at start if it doesn't see a sender within this many seconds. Furthermore, the sender needs to start transmission of data within this delay. Once transmission is started, the timeout no longer applies. Networking options --portbase portbase Default ports to use for udpcast. Two ports are used: portbase and portbase+1 . Thus, Portbase must be even. Default is 9000. The same portbase must be specified for both "udp-sender" and "udp-receiver". --interface interface Network interface used to send out the data. Default is "eth0" --ttl ttl Time to live for connection request packet (by default connection request is broadcast to the LAN's broadcast address. If ttl is set, the connection request is multicast instead to 224.0.0.1 with the given ttl, which should enable udpcast to work between LANs. Not tested though. --mcast-rdv-address address Uses a non-standard multicast address for the control connection (which is used by the sender and receivers to "find" each other). This is not the address that is used to transfer the data. By default "mcast-rdv-address" is the Ethernet broadcast address if "ttl" is 1, and 224.0.0.1 otherwise. This setting should not be used except in very special situations, such as when 224.0.0.1 cannot be used for policy reasons. --exit-wait milliseconds When transmission is over, receiver will wait for this time after receiving the final REQACK. This is done in order to guard against loss of the final ACK. Is 500 milliseconds by default. --ignore-lost-data Do not stop reception when data loss is detected, but instead fill with random data. This is useful for multimedia transmission where 100% integrity is not need. Statistics options --stat-period seconds Every so much milliseconds, print some statistics to stderr: how much bytes received so far log, position in uncompressed file (if applicable), overall bitrate... By default, this is printed every half second. --print-uncompressed-position flag By default, udp-receiver only prints the position in uncompressed file if the 2 following conditions are met: o Output is piped via a compressor ("-p " option). o The final output is seekable (file or device) With the "--print-uncompressed-position", options, you can change this behavior: o If flag is 0, uncompressed position will never be printed, even if above conditions are met o If flag is 1, uncompressed position will always be printed, even if above conditions are not met SEE ALSO
udp-sender AUTHOR
Alain Knaff current July 23, 2011 UDP-RECEIVER(1)
All times are GMT -4. The time now is 11:27 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy