Sponsored Content
Top Forums Shell Programming and Scripting ShellScript to Remove Newline in ouput.csv Post 302748991 by Jotne on Thursday 27th of December 2012 08:57:50 AM
Old 12-27-2012
Problem with solution in post #2 and #3 is that it does not stop.
If there are more words following, it will be printed on the same line.
So you need some type of record separator.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

how to remove all tabs and newline (\n)

how to remove all tabs and newline (\n) from the exicting file (2 Replies)
Discussion started by: pvr_satya
2 Replies

2. Shell Programming and Scripting

Remove newline character conditionally

Hi All, I have 5000 records like this Request_id|Type|Status|Priority|Ticket Submitted Date and Time|Actual Resolved Date and Time|Current Ticket Owner Group|Case final Ticket Owner Group|Customer Severity|Reported Symptom/Request|Component|Hot Topic|Reason for Missed SLA|Current Ticket... (2 Replies)
Discussion started by: j_53933
2 Replies

3. Shell Programming and Scripting

sed/awk remove newline

Hi, I have input file contains sql queries i need to eliminate newlines from it. when i open it vi text editor and runs :%s/'\n/'/g it provides required result. but when i run sed command from shell prompt it doesn't impact outfile is still same as inputfile. shell] sed -e... (6 Replies)
Discussion started by: mirfan
6 Replies

4. Shell Programming and Scripting

remove newline between two string with sed command in unix shellscript

I have a file (test.dat) which contains data like this 459|199811047|a |b |shan kar|ooty| 460|199811047|a |bv |gur u|cbe| but I need it like: 459|199811047|a |b |shankar|ooty| 460|199811047|a |b |guru|cbe| While reading the data from this file, I don't want to remove newline from the end of... (4 Replies)
Discussion started by: jcrshankar
4 Replies

5. Shell Programming and Scripting

Create an .csv/excel file using shellscript

In my file, i have 4 Product names(For ex:Microsoft excel, Oracle,.Net,IBM websphere,..etc.,) I want this 4 Products in 4 individual .csv/excel file after running the script with those products related information. (12 Replies)
Discussion started by: Navya
12 Replies

6. Shell Programming and Scripting

remove ] followed by newline in bash

I need to remove ] followed by newline character to convert lines like: line1] line2 into: line1line2 (4 Replies)
Discussion started by: locoroco
4 Replies

7. Shell Programming and Scripting

Remove newline character between two delimiters

hi i am having delimited .dat file having content like below. test.dat(5 line of records) ====== PT2~Stag~Pt2 Stag Test. Updated~PT2 S T~Area~~UNCEF R20~~2012-05-24 ~2014-05-24~~ PT2~Stag y~Pt2 Stag Test. Updated~PT2 S T~Area~METR~~~2012-05-24~2014-05-24~~test PT2~Pt2 Stag Test~~PT2 S... (4 Replies)
Discussion started by: sushine11
4 Replies

8. Linux

Remove newline in middle of string

my file input is with tab as delimiter, and in every line, there would be a skip of line with an unexcepted newline breaker. I'd like to remove this \n and put the information in the same line. INPUT a1 b1b2 c1 c2 d1 a2 b3 c3 d4 OUTPUT a1 b1b2 c1c2 ... (9 Replies)
Discussion started by: kinkichin
9 Replies

9. Shell Programming and Scripting

Remove last newline character..

Hi all.. I have a text file which looks like below: abcd efgh ijkl (blank space) I need to remove only the last (blank space) from the file. When I try wc -l the file name,the number of lines coming is 3 only, however blank space is there in the file. I have tried options like... (14 Replies)
Discussion started by: Sathya83aa
14 Replies

10. Shell Programming and Scripting

Shellscript command to remove files starting with a certain string, and older than 3 days

Hi All, Need help in identifying a shellscript command to remove all files on a server directory, starting with a certain prefix and also older than 3 days. That means files created with that prefix, today or yesterday, shouldn't be removed. Thanks, Dev (3 Replies)
Discussion started by: dev.devil.1983
3 Replies
DBSchema::Column(3pm)					User Contributed Perl Documentation				     DBSchema::Column(3pm)

NAME
DBIx::DBSchema::Column - Column objects SYNOPSIS
use DBIx::DBSchema::Column; #named params with a hashref (preferred) $column = new DBIx::DBSchema::Column ( { 'name' => 'column_name', 'type' => 'varchar' 'null' => 'NOT NULL', 'length' => 64, 'default' => '', 'local' => '', } ); #list $column = new DBIx::DBSchema::Column ( $name, $sql_type, $nullability, $length, $default, $local ); $name = $column->name; $column->name( 'name' ); $sql_type = $column->type; $column->type( 'sql_type' ); $null = $column->null; $column->null( 'NULL' ); $column->null( 'NOT NULL' ); $column->null( '' ); $length = $column->length; $column->length( '10' ); $column->length( '8,2' ); $default = $column->default; $column->default( 'Roo' ); $sql_line = $column->line; $sql_line = $column->line($datasrc); $sql_add_column = $column->sql_add_column; $sql_add_column = $column->sql_add_column($datasrc); DESCRIPTION
DBIx::DBSchema::Column objects represent columns in tables (see DBIx::DBSchema::Table). METHODS
new HASHREF new [ name [ , type [ , null [ , length [ , default [ , local ] ] ] ] ] ] Creates a new DBIx::DBSchema::Column object. Takes a hashref of named parameters, or a list. name is the name of the column. type is the SQL data type. null is the nullability of the column (intrepreted using Perl's rules for truth, with one exception: `NOT NULL' is false). length is the SQL length of the column. default is the default value of the column. local is reserved for database-specific information. Note: If you pass a scalar reference as the default rather than a scalar value, it will be dereferenced and quoting will be forced off. This can be used to pass SQL functions such as "now()" or explicit empty strings as '' as defaults. name [ NAME ] Returns or sets the column name. type [ TYPE ] Returns or sets the column type. null [ NULL ] Returns or sets the column null flag (the empty string is equivalent to `NOT NULL') length [ LENGTH ] Returns or sets the column length. default [ LOCAL ] Returns or sets the default value. local [ LOCAL ] Returns or sets the database-specific field. table_obj [ TABLE_OBJ ] Returns or sets the table object (see DBIx::DBSchema::Table). Typically set internally when a column object is added to a table object. table_name Returns the table name, or the empty string if this column has not yet been assigned to a table. line [ DATABASE_HANDLE | DATA_SOURCE [ USERNAME PASSWORD [ ATTR ] ] ] Returns an SQL column definition. The data source can be specified by passing an open DBI database handle, or by passing the DBI data source name, username and password. Although the username and password are optional, it is best to call this method with a database handle or data source including a valid username and password - a DBI connection will be opened and the quoting and type mapping will be more reliable. If passed a DBI data source (or handle) such as `DBI:mysql:database' or `DBI:Pg:dbname=database', will use syntax specific to that database engine. Currently supported databases are MySQL and PostgreSQL. Non-standard syntax for other engines (if applicable) may also be supported in the future. quoted_default DATABASE_HANDLE Returns this column's default value quoted for the database. sql_add_column [ DBH ] Returns a list of SQL statements to add this column to an existing table. (To create a new table, see "sql_create_table" in DBIx::DBSchema::Table instead.) The data source can be specified by passing an open DBI database handle, or by passing the DBI data source name, username and password. Although the username and password are optional, it is best to call this method with a database handle or data source including a valid username and password - a DBI connection will be opened and the quoting and type mapping will be more reliable. If passed a DBI data source (or handle) such as `DBI:Pg:dbname=database', will use PostgreSQL-specific syntax. Non-standard syntax for other engines (if applicable) may also be supported in the future. sql_alter_column PROTOTYPE_COLUMN [ DATABASE_HANDLE | DATA_SOURCE [ USERNAME PASSWORD [ ATTR ] ] ] Returns a list of SQL statements to alter this column so that it is identical to the provided prototype column, also a DBIx::DBSchema::Column object. Optionally, the data source can be specified by passing an open DBI database handle, or by passing the DBI data source name, username and password. If passed a DBI data source (or handle) such as `DBI:Pg:dbname=database', will use PostgreSQL-specific syntax. Non-standard syntax for other engines (if applicable) may also be supported in the future. If not passed a data source (or handle), or if there is no driver for the specified database, will attempt to use generic SQL syntax. sql_drop_column [ DBH ] Returns a list of SQL statements to drop this column from an existing table. The optional database handle or DBI data source/username/password is not yet used. AUTHOR
Ivan Kohler <ivan-dbix-dbschema@420.am> COPYRIGHT
Copyright (c) 2000-2006 Ivan Kohler Copyright (c) 2007-2010 Freeside Internet Services, Inc. All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. BUGS
The new() method should warn that "Old-style $class creation without named parameters is deprecated!" Better documentation is needed for sql_add_column sql_alter_column() has database-specific foo that should be abstracted info DBIx::DBSchema::DBD::Pg nullify_default option should be documented SEE ALSO
DBIx::DBSchema::Table, DBIx::DBSchema, DBIx::DBSchema::DBD, DBI perl v5.14.2 2010-03-26 DBSchema::Column(3pm)
All times are GMT -4. The time now is 06:42 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy