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
XTEDDY(6)							   Games Manual 							 XTEDDY(6)

NAME
xteddy - cuddly teddy bear for your X Windows desktop. SYNOPSIS
xteddy [ -wm -float -noquit -nocursor -F<file> ] [ -geometry WIDTHxHEIGHT+X+Y -display SERVER ] [ -h --help -v ] DESCRIPTION
Xteddy is a cuddly teddy bear for your X Windows desktop. Normally, xteddy just sits around doing nothing. After all, that's what teddy bears are for. Look at him, talk to him, place heavy windows on top of him, zap him around until he becomes dizzy, do what you like; he will always be your true (albeit virtual) friend. You can move xteddy with the mouse by pointing at him and dragging him around. When clicked upon, he will pop up on top of all other win- dows. If you type "q" or "Esc" on him, he will exit (or, as I like to think of it, be tucked away in the file system until you need him next time). That's it. But he's cute. OPTIONS
-wm Use the window manager. Normally, xteddy sets the override_redirect flag for his window, which will cause most window managers to ignore him. However, some window managers might have problems coping with a window that is nailed directly to the root. In that case, use this option. If possible, instruct your window manager not to put any title bar or window frame on the window, or xteddy will lose some of his charm. -float Float up on top of overlapping windows. This will make xteddy stay in sight at all times, so you won't lose him. However, this is a bit intrusive and quite unlike a real teddy bear, so it is not the default action. -noquit Disable the "quit" command (do not quit when typing "q" in the window, but of course still on explicit window kills or process kills). This might seem an unnecessary option, but if you use the -wm option Xteddy might keep receiving keyboard events even after the mouse has left his window. I you use the -wm option in conjunction with a click-to-type window manager, you would probably want to include this option. -nocursor Disable the X11 cursor over the xteddy window. -F,-f < file > Display another image instead of xteddy. file can be the full name of an image file which reasonably should contain a transparent background. If there is no such file in the current working directory xteddy searches in $(installation_pre- fix)/share/xteddy, where $(installation_prefix) is determined at compile time (for instance /usr/X11R6). If this fails by default /usr/share/xteddy is searched. Failing this, /usr/local/share/xteddy is searched. If there is no such file in these directories the following appendixes where appended to the given name: xpm, png, tif, jpg, jpeg, gif and pnm. These files will be searched in the three directories. If all files the last try is to append the extensions in upper cases. '-F' and '-f' are equivalent, and the space in '-f <file>' is optional. If no `-F` parameter is given file equals to xteddy or more precisely to the name of the calling program. For instance if there is a sym- link ln -s xteddy xpenguin then file equals to xpenguin and the appropriate pixmaps with the name xpenguin are searched for. -geometry The standard X geometry specification. Only X and Y position requests are honored. Any height and width specifications will be ignored. -display Specify an X server other than the local display. -h, --help Print a help message and exit. -v Print the version number and exit. BEARS
The cast of characters is currently: teddy xalex xbobo xbrummi xcherubino xduck xhedgehog xklitze xnamu xorca xpenguin xpuppy xruessel xteddy xtrouble.png xtrouble_large xtuxxy. AUTHOR
Stefan Gustavson, ISY-LiTH (stegu@itn.liu.se). Xteddy is distributed under the GNU General Public License. BUGS
The Desktop Manager in Sun CDE (Common Desktop Environment) does not like xteddy. Xteddy by default does not use the window manager, and so he shows up as a sticky window on all desktops. If you don't like this, and try to circumvent it by running him with the -wm option, move him by grabbing him by the tummy instead of by the title bar, and then move him partly off the screen, the image is lost and never redrawn again, so all you see is a silhouette of a teddy bear. I have no idea why this happens. If you know, please tell me, and if you can fix it, please do. If you run CDE on other platforms than Sun, please tell me if it works for you. CDE does something which xteddy does not handle properly, and since I have a Sun with CDE myself I would like to know what the problem is. For most X servers, the -float option does not work properly if xteddy is moved partially off the screen. This is the X server's fault, not mine. If two copies of xteddy are placed so they overlap, and both were run with the -float option, the X server will try to put each on top of the other in an endless loop, which looks very bad and takes a lot of CPU power. Xteddy does not make use of the X resource database. I just didn't get around to that. Please send bug reports, fixes, suggestions, fan mail or or hacks to: stegu@itn.liu.se. X Version 11 25 May 2005 XTEDDY(6)
All times are GMT -4. The time now is 05:22 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy