01-23-2011
your problem is that you don't quote $line.
Use More Quotes!
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
i have single column which is starting with same string(many number of rows)
i have to convert each into a single row.how can i do that?
laknar
std
mes
23
55
laknar
isd
phone no
address
amount
99
I have to convert above like below.
laknar|std|mes|23|55
laknar|isd|phone... (3 Replies)
Discussion started by: laknar
3 Replies
2. Shell Programming and Scripting
Hi all,
I need to convert this file having just one column into two column file
current file:
a
15
b
21
c
34
d
48
e
10
wanted:
a 15
b 21
c 34 (15 Replies)
Discussion started by: prachiagra
15 Replies
3. Shell Programming and Scripting
Can somebody help me in solving this..
Input data is like
0 A
1 B
2 C
3 D
0 A1
1 B1
2 C1
3 D1
0 A2
1 B2
2 C2
3 D2
Output should be like
A B C D
A1 B1 C1 D1
A2 B2 C2 D2 (7 Replies)
Discussion started by: Mahantesh Patil
7 Replies
4. Shell Programming and Scripting
Hi,
Can anyone suggest quick way to get desired output?
Sample input file content:
A 12 9
A -0.3 2.3
B 1.0 -4
C 34 1000
C -111 900
C 99 0.09
Output required:
A 12 9 -0.3 2.3
B 1.0 -4
C 34 1000 -111 900 99 0.09
Thanks (3 Replies)
Discussion started by: cbm_000
3 Replies
5. UNIX for Dummies Questions & Answers
Hi All,
My requisite is to split a single column of phonemes seperated by spaces into multiple rows.
my input file is:
a
dh
u
th
a
qn
ch
A
v
U
r
k
my o/p should be like:
adhu a dh u (3 Replies)
Discussion started by: girlofgenuine
3 Replies
6. Shell Programming and Scripting
How to change the uploaded weekly file data to the following format?
New Well_Id,Old Well_Id,District,Thana,Date,Data,R.L,WellType,Lati.,Longi.
BAG001,PT006,BARGUNA,AMTALI,1/2/1978,1.81,2.29,Piezometer,220825,901430
BAG001,PT006,BARGUNA,AMTALI,1/9/1978,1.87,2.29,Piezometer,220825,901430... (3 Replies)
Discussion started by: sara.nowreen
3 Replies
7. Shell Programming and Scripting
Convert Single column to multiple rows
file a.txt contains data like below
Server=abc
Run=1
Tables=10
Sessions=16
Time=380
Jobs=5
Server=abc
Run=2
Tables=15
Sessions=16
Time=400
Jobs=5
Server=abc
Run=3
Tables=20
Sessions=16
Time=450 (5 Replies)
Discussion started by: sol_nov
5 Replies
8. Shell Programming and Scripting
Hi,
I want to convert a single row values to multiple rows, but the no. of rows are not fixed.
For example, I have a row as below
abc-def-lmn-mno-xyz
out put should be
get abc
get def
get lmn
get xyz (4 Replies)
Discussion started by: Suneel Mekala
4 Replies
9. Shell Programming and Scripting
Hi .. anyone can you help me ?
i need to convert text below into multiple columns
interface; GigabitEthernet0/0/0/0
description; TRUNK_PE-D2-JT2-VPN_Gi0/0/0/0_TO_ME4-A-JKT-JT_4/1/1_1G
mtu 9212
negotiation auto
interface; GigabitEthernet0/0/0/0.11
description; tes
encapsulation;... (1 Reply)
Discussion started by: mad3linux
1 Replies
10. UNIX for Beginners Questions & Answers
I have a large csv dataset like this : A value1
A value2
A value3
B value1
B value2
B value3
C value1
C value2
C value3
what I expected output is :A value1 value2 value3
B value1 value2 value3
C value1 value2 value3
I'm thinking of use like awk, columns , but haven't find a proper... (4 Replies)
Discussion started by: nengcheng
4 Replies
LEARN ABOUT CENTOS
sgmlpre
SGMLPRE(1) General Commands Manual SGMLPRE(1)
NAME
sgmlpre - handle SGML conditionalization for SGML-tools
SYNOPSIS
sgmlpre [options] ...
DESCRIPTION
This manual page documents briefly the sgmlpre commands. This manual page was written for the Debian GNU/Linux distribution because the
original program does not have a manual page for sgmlpre.
sgmlpre is a program that handle SGML conditionalization for SGML-tools
It is used by other programs in sgml-tools (v1), and usually normal user does not need to use this program directly by himself.
Following is quoted from the header in the source code.
(Begin Quotes)
sgmlpre -- handle SGML conditionalization for SGML-tools by Eric S. Raymond <esr@thyrsus.com>, 3 Nov 1997
Filter SGML according to conditionalizing markup. Argument/value pairs from the command line are matched against the attributes of
<#if> and <#unless> tags. Spans between <#if>/</#if> are passed through unaltered if there is no attribute mismatch; spans between
<#unless></#unless> are passed if there is at least one attribute mismatch. An attribute mismatch happens if an attribute occurs
in both the command-line arguments and the tag, but the values do not match. Value matching is by string equality, except that "|"
is interpreted as an alternation character. Even if a span is not passed through, its newlines are (this to avoid messing up the
line numbers in error messages).
This lexer requires flex. Limitations; attribute names may only be 256 chars long, values may be only 16384 (YY_BUF_SIZE) charac-
ters long. Doesn't do checking that only </if> matches <if> and </unless> matches <unless> (that would need a stack and introduce
another limit).
(End Quotes)
OPTIONS
The program does not support normal command line options.
SEE ALSO
For a complete description, see the header in the source archive.
AUTHOR
sgmlpre was written by Eric S. Raymond <esr@thyrsus.com>, 3 Nov 1997.
This manual page was written by Taketoshi Sano <sano@debian.org>, for the Debian GNU/Linux system (but may be used by others).
SGMLPRE(1)