04-27-2009
to append data in a single row
Hi all,
I need a logic in UNIX to append contents of a file in same row, where the original contents are found one below the other. For example.
My i/p file contains:
“user1”,”employee1”,”04/28/2009”
“5678”
“78”
“user2”,”employee2”,”04/30/2009”
I want my output as
“user1”,”employee1”,”04/28/2009”,”5678”,”78”,“user2”,”employee2”,”04/30/2009”
Please look at the comma between each entry. Each value should be delimited by comma.
Regards Meera
9 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi
I need to do some thing like "find and insert before that " in a file which contains many records. This will be clear with the following example.
The original data record should be some thing like this
60119827 RTMS_LOCATION_CDR INSTANT_POSITION_QUERY 1236574686123083rtmssrv7 ... (8 Replies)
Discussion started by: aemunathan
8 Replies
2. Shell Programming and Scripting
Guys -- I am noob and I am really strugging on this one. I cant even write the pseudo code for it. I have a file that spits values in individual rows as such:
file:
user date type size
joe 2005-25-09 log 1
joe 2005-25-09 snd 10
joe 2005-25-09 rcd 12
joe 2005-24-09 log 2
joe... (1 Reply)
Discussion started by: made2last
1 Replies
3. Shell Programming and Scripting
Hi
I want to append line 2n to 2n-1 line where n=1...LastLine in my file.
eg:
Actual File:
Hello
Everyone
Welcome
TO Unix
I need
Your help
Required File:
HelloEveryone
WelcomeTO Unix
I needYour help (5 Replies)
Discussion started by: dashing201
5 Replies
4. Shell Programming and Scripting
I searched the thread i couldn't able to find the solution that's y posted here.. help me
i have a file as
setting field value A 0
setting field value B 2
setting field value C 3
some text
------
---
some text
setting field value A 0
setting field value B 2
setting field value... (9 Replies)
Discussion started by: greenworld123
9 Replies
5. Shell Programming and Scripting
Hi Friends,
I have a single column data like below.
1
2
3
4
5
I need the output like below.
0
1
2
3
4
where each row (including first row) subtracting from first row and the result should print below like the way shown in output file.
Thanks
Sid (11 Replies)
Discussion started by: ks_reddy
11 Replies
6. Shell Programming and Scripting
Hi All
I will run the same script every day in corn and output should go to same CSV file but in different row with dates on it. Below is my example in attached format.
Script i am using to collect switch port online
DATE=`date '+%d-%m-%y'`
for f in `cat... (1 Reply)
Discussion started by: ranjancom2000
1 Replies
7. Emergency UNIX and Linux Support
Sorry if I repost my question in this section, but I'm really in a hurry since I have to finish my work... :(
Dear community,
I have a table with two rows like:
Row1 Row2
======= =======
7,3 text 1
1,3 text 2
1,2,3 blabla
What i need to do is add/copy... (2 Replies)
Discussion started by: Lord Spectre
2 Replies
8. Shell Programming and Scripting
Hi All,
We have a file in the following format:
0.010000 $ ITI 11 LV2 $ 40456211 $
0.135000 $ ITI 11 LV1 $ 40512211 $
1.215600 $ ITI 11 ITI3 $ 41406211 $
24/05/2014 14:05:02
0.030000 $ ITI 11 LV2 $ 40456211 $
... (3 Replies)
Discussion started by: gauravsinghal79
3 Replies
9. Shell Programming and Scripting
Hi ALL,
We have requirement in a file, i have multiple rows.
Example below:
Input file rows
01,1,102319,0,0,70,26,U,1,331,000000113200000011920000001212
01,1,102319,0,1,80,20,U,1,241,00000059420000006021
I need my output file should be as mentioned below. Last field should split for... (4 Replies)
Discussion started by: kotra
4 Replies
LEARN ABOUT DEBIAN
gdcmtar
gdcmtar(1) GDCM gdcmtar(1)
NAME
gdcmtar - Concatenate/Extract DICOM files.
SYNOPSIS
gdcmtar [options] file-in file-out
DESCRIPTION
The gdcmtar is a command line tool used to tar/untar multi-frames images (including SIEMENS MOSAIC file)
PARAMETERS
file-in DICOM input filename
file-out DICOM output filename
options
options
--enhance enhance (default)
-U --unenhance unenhance
-M --mosaic Split SIEMENS Mosaic image into multiple frames.
-p --pattern Specify trailing file pattern.
--root-uid Root UID.
general options
-h --help
print this help text and exit
-v --version
print version information and exit
-V --verbose
verbose mode (warning+error).
-W --warning
warning mode, print warning information
-E --error
error mode, print error information
-D --debug
debug mode, print debug information
environment variable
GDCM_ROOT_UID Root UID
Typical usage
SIEMENS Mosaic
$ gdcminfo MR-sonata-3D-as-Tile.dcm
MediaStorage is 1.2.840.10008.5.1.4.1.1.4 [MR Image Storage]
TransferSyntax is 1.2.840.10008.1.2.1 [Explicit VR Little Endian]
NumberOfDimensions: 2
Dimensions: (384,384,1)
...
$ gdcmtar --mosaic -i MR-sonata-3D-as-Tile.dcm -o mosaic --pattern %03d.dcm
Will output:
-rw-r--r-- 1 mathieu mathieu 72882 2009-08-10 11:14 mosaic000.dcm
-rw-r--r-- 1 mathieu mathieu 72886 2009-08-10 11:14 mosaic001.dcm
-rw-r--r-- 1 mathieu mathieu 72886 2009-08-10 11:14 mosaic002.dcm
-rw-r--r-- 1 mathieu mathieu 72886 2009-08-10 11:14 mosaic003.dcm
-rw-r--r-- 1 mathieu mathieu 72886 2009-08-10 11:14 mosaic004.dcm
-rw-r--r-- 1 mathieu mathieu 72886 2009-08-10 11:14 mosaic005.dcm
-rw-r--r-- 1 mathieu mathieu 72884 2009-08-10 11:14 mosaic006.dcm
-rw-r--r-- 1 mathieu mathieu 72882 2009-08-10 11:14 mosaic007.dcm
-rw-r--r-- 1 mathieu mathieu 72884 2009-08-10 11:14 mosaic008.dcm
-rw-r--r-- 1 mathieu mathieu 72884 2009-08-10 11:14 mosaic009.dcm
-rw-r--r-- 1 mathieu mathieu 72884 2009-08-10 11:14 mosaic010.dcm
-rw-r--r-- 1 mathieu mathieu 72884 2009-08-10 11:14 mosaic011.dcm
-rw-r--r-- 1 mathieu mathieu 72884 2009-08-10 11:14 mosaic012.dcm
-rw-r--r-- 1 mathieu mathieu 72884 2009-08-10 11:14 mosaic013.dcm
-rw-r--r-- 1 mathieu mathieu 72882 2009-08-10 11:14 mosaic014.dcm
-rw-r--r-- 1 mathieu mathieu 72884 2009-08-10 11:14 mosaic015.dcm
-rw-r--r-- 1 mathieu mathieu 72882 2009-08-10 11:14 mosaic016.dcm
-rw-r--r-- 1 mathieu mathieu 72884 2009-08-10 11:14 mosaic017.dcm
-rw-r--r-- 1 mathieu mathieu 72884 2009-08-10 11:14 mosaic018.dcm
-rw-r--r-- 1 mathieu mathieu 72884 2009-08-10 11:14 mosaic019.dcm
-rw-r--r-- 1 mathieu mathieu 72884 2009-08-10 11:14 mosaic020.dcm
-rw-r--r-- 1 mathieu mathieu 72884 2009-08-10 11:14 mosaic021.dcm
-rw-r--r-- 1 mathieu mathieu 72884 2009-08-10 11:14 mosaic022.dcm
-rw-r--r-- 1 mathieu mathieu 72884 2009-08-10 11:14 mosaic023.dcm
-rw-r--r-- 1 mathieu mathieu 72884 2009-08-10 11:14 mosaic024.dcm
-rw-r--r-- 1 mathieu mathieu 72884 2009-08-10 11:14 mosaic025.dcm
-rw-r--r-- 1 mathieu mathieu 72884 2009-08-10 11:14 mosaic026.dcm
-rw-r--r-- 1 mathieu mathieu 72884 2009-08-10 11:14 mosaic027.dcm
-rw-r--r-- 1 mathieu mathieu 72884 2009-08-10 11:14 mosaic028.dcm
-rw-r--r-- 1 mathieu mathieu 72884 2009-08-10 11:14 mosaic029.dcm
-rw-r--r-- 1 mathieu mathieu 72882 2009-08-10 11:14 mosaic030.dcm
$ gdcminfo mosaic000.dcm
MediaStorage is 1.2.840.10008.5.1.4.1.1.4 [MR Image Storage]
TransferSyntax is 1.2.840.10008.1.2.1 [Explicit VR Little Endian]
NumberOfDimensions: 2
Dimensions: (64,64,1)
...
SEE ALSO
gdcmdump(1), gdcmraw(1), gdcminfo(1)
COPYRIGHT
Copyright (c) 2006-2011 Mathieu Malaterre
Version 2.2.0 Tue Feb 5 2013 gdcmtar(1)