Sponsored Content
Top Forums Shell Programming and Scripting How to fill data from other file and get some output Post 302525183 by anil8103 on Thursday 26th of May 2011 03:38:44 AM
Old 05-26-2011
Code:
awk < infile '{print "NAME :"$2,"\n","SURNAME :" $3 ,"\n","BIRTHDAY :"$1 }'

Input file contents are as below

Code:
01/01/80 Mitch Conley
15/07/81 ANIL Kumar

Output as below
Code:
NAME :Mitch 
 SURNAME :Conley 
 BIRTHDAY :01/01/80
NAME :ANIL 
 SURNAME :Kumar 
 BIRTHDAY :15/07/81

Hope this will be okay

Great day
Anil.G

Moderator's Comments:
Mod Comment Please use [code] and [/code] tags when posting code, data or logs etc. to preserve formatting and enhance readability, thanks.

Last edited by zaxxon; 05-26-2011 at 04:54 AM.. Reason: code tags
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Korn: How to zero fill df output so it will sort properly

I'm looking for a way in Korn shell to zero fill (or space fill) the output from df so that it will sort properly. "Raw" output from df -k: df -k Filesystem kbytes used avail capacity Mounted on /dev/vx/dsk/rootvol 4131866 3593302 497246 88% / /proc ... (9 Replies)
Discussion started by: shew01
9 Replies

2. UNIX for Dummies Questions & Answers

how to fill the name of the spread sheet as a cell's data

In open office spreadsheet, i would like to fill a cell with the name of the spread sheet. That is if the file name of spread sheet is, team.ods, then i have to fill a specific cell with that name 'team'. How to do that ? I have more spread sheets to be created, so i want it to be done... (0 Replies)
Discussion started by: thegeek
0 Replies

3. UNIX for Advanced & Expert Users

Command to output ones (like zero-fill), with progress indicator

Well, I was originally going to post this snippet in the original thread titled "how to output ones endlessly like /dev/zero", but that topic was closed without an efficient answer. It was difficult to find (build) a satisfactory answer to this one, so I thought I'd share it here and as a "fill... (1 Reply)
Discussion started by: Gliktch
1 Replies

4. Shell Programming and Scripting

fill in last column of data

Hello, I am fairly new to awk, and I have the following problem. My file has missing data in the last column, and the program I am pre-processing this file for cannot interpret correctly shortened rows (it just wraps the data around). Is there a way to force awk to create the same... (6 Replies)
Discussion started by: timert34
6 Replies

5. Shell Programming and Scripting

Fill in missing Data

hello everyone, I have a task to input missing data into a file. example of my data below: Wed Feb 01 09:00:02 EST 2012,,,0.4,0.3,,0.3,,0.3,,0.5,,0.3,,,0.4,0.3, Wed Feb 01 09:00:11 EST 2012,,,,,,,0.2,,,,,,,,,, Wed Feb 01 09:00:22 EST... (23 Replies)
Discussion started by: Nolph
23 Replies

6. Shell Programming and Scripting

Script which fill data in XML file

Hello, I need help for writing a script that fills already generated xml file with data from oracle database and random sequences. For example if we have the following tags: <ns1:message> <ns1:messageId> </ns1:messageId> <ns1:languageCode> </ns1:languageCode>... (10 Replies)
Discussion started by: zb99
10 Replies

7. Shell Programming and Scripting

Fill data if number range is given

Hi I want to get all numbers if number range is given as input. Eg: INPUT FILE 100-105 107 108-112 OUTPUT REQUIRED: 100 101 102 103 104 105 107 108 109 110 111 112 How can I do it using shell? :confused: Thanks in advance. (11 Replies)
Discussion started by: dashing201
11 Replies

8. Shell Programming and Scripting

Help with add existing file name as new data column in new output file

Input File 1 cat S1.txt MI0043 2731 miR-1 Input File 2 cat S4.txt MI006 310 CiR-1 MI057 10 CiR-24 MI750 5 CiR-24 Desired Output File 1 cat S1.txt.out MI0043 2731 miR-1 S1.txt Desired Output File 2 cat S4.txt.out MI006 310 CiR-1 S4.txt (3 Replies)
Discussion started by: perl_beginner
3 Replies

9. Shell Programming and Scripting

Fill data in column with previous value

Gents, Kindly help me. I have a file with empty values in selected column, I will like to fill the empty values with the previous value. Example Input file X 4959 30010 66727.00 20457.001 1 1441 66512.00 20234.00 20520.001 X 4959 30010 66727.00 20457.001 145 ... (7 Replies)
Discussion started by: jiam912
7 Replies

10. Shell Programming and Scripting

awk to reformat output if input file is empty, but not if file has data in it

The below awk improved bu @MadeInGermany, works great as long as the input file has data in it in the below format: input chrX 25031028 25031925 chrX:25031028-25031925 ARX 631 18 chrX 25031028 25031925 chrX:25031028-25031925 ARX 632 14... (3 Replies)
Discussion started by: cmccabe
3 Replies
gii_cmd_event(3)							GGI							  gii_cmd_event(3)

NAME
gii_cmd_event, gii_cmd_nodata_event - LibGII commands and information events SYNOPSIS
#include <ggi/events.h> typedef struct { COMMON_DATA; uint32_t code; } gii_cmd_nodata_event; #define GII_CMD_DATA_MAX (248-sizeof(gii_cmd_nodata_event)) typedef struct gii_cmd_event { COMMON_DATA; uint32_t code; uint8_t data[GII_CMD_DATA_MAX]; } gii_cmd_event; DESCRIPTION
These are used internally either to the application or the kernel. The same event is used for both Command and Information events. GENERATED EVENTS
gii_cmd_event is the basic structure for evCommand and evInformation events. It may need to be casted to some other structure (depending on code) to access the data. STRUCTURE MEMBERS
code The command or request code. data Provides raw access to the device and/or command specific data. The recipient must not store references to the data. If the data information is needed afterwards, copy it! DEVICE INFORMATION
One use of evCommand is to convey some capabilities of a GII device, via the GII_CMDCODE_GETDEVINFO command code. SEE ALSO
gii_event(3), gii_cmddata_getdevinfo(3) libgii-1.0.x 2006-12-30 gii_cmd_event(3)
All times are GMT -4. The time now is 05:06 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy