Sponsored Content
Full Discussion: awk stuff
Top Forums Shell Programming and Scripting awk stuff Post 302913988 by Nandy on Thursday 21st of August 2014 08:31:05 AM
Old 08-21-2014
awk stuff

Hi,

My input file data will be
Code:
|ABCD|EFGH|IJKL|MNOP
|ABCD|EF\|GH|IJKL|MNOP

I am expecting output ,
Code:
|"ABCD"|"EFGH"|"IJKL"|"MNOP"
|"ABCD"|"EF|GH"|"IJKL"|"MNOP"

Note : The change basically the pipe deilmited file does contain | as value for some of the column but | will come with escape char \ always when it will be a value.

Please provide your ideas. i am looking for not only awk .. something different also welcome.

thanks in advance for your inputs

Last edited by Franklin52; 08-21-2014 at 09:52 AM.. Reason: Please use code tags
 

5 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Simple stuff.

I hacked my TIVO a few months ago. I made a computer specifically for this, but I only used a UNIX boot disk to get all the TIVO goodies to work. I am intersted in getting some version of UNIX on this machine and getting it onto my network. I only want to do some simple file transfers, maybe... (1 Reply)
Discussion started by: IamJAWA
1 Replies

2. Windows & DOS: Issues & Discussions

weird stuff

I coudln't think of another topic to post this under as the OS on the system is XP pro. Ok here is the go. I'm upgrdaing a mates computer. A AMD 1200Mhz and well it wouldn't boot from the CD to do a fresh install (By upgrade I mean OS with complete new install). So I opened up the box and... (4 Replies)
Discussion started by: woofie
4 Replies

3. Shell Programming and Scripting

A schoolboyish stuff

Hi , This is a pretty simple sed command i found when i was checking out one of the codes of my colleague . sed -e 's/\*.*\) \(\ <1*e\ >\) \(*.*\)/\2/' When i tried this on a few text files it was displaying the entire line. If this was to display entire line why sweat out on a sed . Does... (3 Replies)
Discussion started by: kinny
3 Replies

4. Shell Programming and Scripting

Please help with monitoring stuff

Hi, I am trying to write a script to do monitoring kind of stuff, requirement - when a server is given a start it updates a file called server.log, I need to keep on grepping the word "Running" and as soon as it comes , script should be exited with the message , "Server came up... (2 Replies)
Discussion started by: sunilmenhdiratt
2 Replies

5. Programming

More Arduino Stuff...

HI all... (Apologies for any typos.) To add to Neo's Arduino subject matter I have decided to upload this in ".zip" format. Ignore "*.info" files these are AMIGA icons only and also the "HAM" drawer as these are photos in ancient AMIGA HAM modes. I have noticed that there are current... (6 Replies)
Discussion started by: wisecracker
6 Replies
Gunroar(6)																Gunroar(6)

NAME
gunroar - 360-degree gunboat shooter DESCRIPTION
Guns, Guns, Guns! Steer a boat and sink enemy fleet! Gunroar is an excellent shooter in which the game environment turns to be the sea and our spaceship an armed boat. The player moves around in a level generated randomly, and containing enemy islands, turrets and enemy boats) and that never ends. Each enemy killed increments your points according to the time it took you to destroy it and its size. OPTIONS
These command-line options are available: -brightness n Set the brightness of the screen. (n = 0 - 100, default = 100) -luminosity n Set the luminous intensity. (n = 0 - 100, default = 0) -res x y Set the screen resolution to (x, y). (default = 640, 480) -nosound Stop the sound. -window Launch the game in a window. -fullscreen Launch the game in fullscreen mode. -exchange Exchange a gun key and a lance key. -turnspeed n Adjust the turning speed. (n = 0 - 500, default = 100) (NORMAL mode) -firerear Fire to the rear of the ship. (NORMAL mode) -rotatestick2 n Rotate the direction of the stick2 in n degrees. (TWIN STICK, DOUBLE PLAY mode) -reversestick2 Reverse the direction of the stick2. (TWIN STICK, DOUBLE PLAY mode) -enableaxis5 Use the input of axis 5 to fire shots. (for Xbox 360 wired controller) (TWIN STICK, DOUBLE PLAY mode) USAGE
You can select a game mode by pressing up/down keys or a lance key at the title screen. (NORMAL / TWIN STICK / DOUBLE PLAY / REPLAY) Controls (NORMAL mode): Move Arrow / Num / [WASD] / [IJKL] / Stick Fire guns / Hold direction [Z][L-Ctrl][R-Ctrl][.] / Trigger 1, 4, 5, 8, 9, 12 Hold a key to open automatic fire and hold the direction of a boat. Tap a key to take a turn while firing. Fire lance [X][L-Alt][R-Alt][L-Shift][R-Shift][/][Return] / Trigger 2, 3, 6, 7, 10, 11 Lance is a single-shot weapon. You have to tap a key to fire a next lance. You can't fire a next lance while a first lance is in a screen. Controls (TWIN STICK mode): It is strongly recommended to use twin analog sticks. Move [WASD] / Stick1 (Axis 1, 2) Fire guns [IJKL] / Stick2 (Axis 3 or 5, 4) You can control the concentration of guns by the analog stick. (If you have a problem with the direction of the stick2, try '-rotat- estick2' and '-reversestick2' options. e.g. '-rotatestick2 -90 -reversestick2') (If you are using Xbox 360 wired controller, use '-enableaxis5' option.) Controls (DOUBLE PLAY mode): Control two boats at a time. Move boat1 [WASD] / Stick1 (Axis 1, 2) Move boat2 [IJKL] / Stick2 (Axis 3 or 5, 4) Controls (MOUSE mode): Steer a ship with a keyboard or a pad, and control a sight with a mouse. Move Arrow / Num / [WASD] / [IJKL] / Stick Control sight Mouse Fire guns (narrow) Mouse left button Fire guns (wide) Mouse right button Controls(In every mode): Pause [P] Quit a game / Back to title [ESC] Rank multiplier: Rank multiplier (displayed in the upper right) is a bonus multiplier that increases with a difficulty of a game. You can increase a rank multiplier faster by going forward faster. Boss appearance timer: Boss appearance timer (displayed in the upper left) is a remaining time before a boss ship appears. SEE ALSO
You can find more about the game on its homepage: http://www.asahi-net.or.jp/~cs8k-cyu/windows/gr_e.html AUTHOR
Gunroar has been written by Kenta Cho <cs8k-cyu@asahi-net.or.jp> Gunroar(6)
All times are GMT -4. The time now is 11:46 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy