10-02-2014
All the suggestion works.. Thanks you so much...
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hello,
I have many csv file, but I would like to delete lines with some values in a column conditionally.
My example look like this,
ex1e, ex2g, ex39, pasg, ssg, mrlc, pc, kb, coop
-112, -53, -177, 64, 62, 71, 1, 487, 20
-101, -61, -53, 0, 32767, 51, 0, ... (6 Replies)
Discussion started by: Jae
6 Replies
2. Shell Programming and Scripting
I am trying to remove the ita from this file:
"1234ita","john","smith"
"56789ita","jim","thomas"
the command i am using is:
sed '/^ita/d' infile.csv > outfile.csv
it is running but doing nothing, very rarely use sed so trying to learn it any help would be appreciated (2 Replies)
Discussion started by: Pablo_beezo
2 Replies
3. Shell Programming and Scripting
Hi,
I need help to remove blank rows at the end of file.
Sample data:
"Oslo, Symra kino",Oslo,130-7,Symra 1,130-7-91
"Tønsberg, Brygga Kino SF",Tønsberg,202-1,Tønsberg SF 4,202-1-4
,,,,
,,,,
,,,,
,,,,
Expected data:
"Oslo, Symra kino",Oslo,130-7,Symra 1,130-7-91
"Tønsberg, Brygga... (6 Replies)
Discussion started by: cnraja
6 Replies
4. Shell Programming and Scripting
Hi Experts,
My requirement is to read the csv file and need to remove if any line break in it.
sample data:
Row1: "Oslo, Symra kino",Oslo,130-7,Symra 1,130-7-91
Row2:"Tønsberg, Brygga Kino SF",Tønsberg,202-1,
Tønsberg SF 4,202-1-4
Expected data:
Row1: "Oslo, Symra... (6 Replies)
Discussion started by: cnraja
6 Replies
5. Shell Programming and Scripting
Hi All
A .csv file containing multiple value on it. i need to remove some value from it. Please advise how can i find multiple value from that and remove itself. Please provide solution for this.
Thanks in advance. (4 Replies)
Discussion started by: yash1978
4 Replies
6. Shell Programming and Scripting
Hi friends,
I am running one SQL though .sh file and in output I am seeing newline whevnever There is a new line in column.
I WANT TO REMOVE NEWLINE IN OUTPUT FILE.
Present out put in Column:
-------------------------
Hi
How
Are
You.
Required output in Column:
-------------
Hi How... (4 Replies)
Discussion started by: crmsachin
4 Replies
7. Shell Programming and Scripting
Dear All,
I have 2 CSV files and want to create a new CSV based on a common value in both of the CSV file.
ColumnA ColumnB ColumnC
Client 1 XXXXX Server A
Client 2 XXXXX Server B
Client 3 XXXXX Server C
2nd CSV file
ColumnA CloumnB
Server A value... (14 Replies)
Discussion started by: rrb2009
14 Replies
8. Shell Programming and Scripting
Hi All ,
I am facing a small challenge i need unix command to remove space as well as replace "|" to "," in a csv file .
original file :
A | B | c | D
E | F | G | H
I | J | K | L
P | M | N | O
Expected o/p:
A,B,c,D
E,F,G,H
I,J,K,L
P,M,N,O (4 Replies)
Discussion started by: Sweety532
4 Replies
9. Shell Programming and Scripting
I found that the following works to remove the first column in my file when my CSV is delimited with a simple comma:
sed -i 's/*,//' file.csv
However, I have a new file where the fields are encapsulated with double quotes - general example of file:
"Internal ID", "External ID", "Name"... (8 Replies)
Discussion started by: lojkyelo
8 Replies
10. Shell Programming and Scripting
how to remove unwanted commas from a .csv file
Input file format
"Server1","server-PRI-Windows","PRI-VC01","Microsoft Windows Server 2012, (64-bit)","Powered On","1,696.12","server-GEN-SFCHT2-VMS-R013,server-GEN-SFCHT2-VMS-R031,server-GEN-SFCHT2-VMS-R023"... (5 Replies)
Discussion started by: ranjancom2000
5 Replies
LEARN ABOUT DEBIAN
carp::always
Carp::Always(3pm) User Contributed Perl Documentation Carp::Always(3pm)
NAME
Carp::Always - Warns and dies noisily with stack backtraces
SYNOPSIS
use Carp::Always;
makes every "warn()" and "die()" complains loudly in the calling package and elsewhere. More often used on the command line:
perl -MCarp::Always script.pl
DESCRIPTION
This module is meant as a debugging aid. It can be used to make a script complain loudly with stack backtraces when warn()ing or die()ing.
Here are how stack backtraces produced by this module looks:
# it works for explicit die's and warn's
$ perl -MCarp::Always -e 'sub f { die "arghh" }; sub g { f }; g'
arghh at -e line 1
main::f() called at -e line 1
main::g() called at -e line 1
# it works for interpreter-thrown failures
$ perl -MCarp::Always -w -e 'sub f { $a = shift; @a = @$a };'
-e 'sub g { f(undef) }; g'
Use of uninitialized value in array dereference at -e line 1
main::f('undef') called at -e line 2
main::g() called at -e line 2
In the implementation, the "Carp" module does the heavy work, through "longmess()". The actual implementation sets the signal hooks
$SIG{__WARN__} and $SIG{__DIE__} to emit the stack backtraces.
Oh, by the way, "carp" and "croak" when requiring/using the "Carp" module are also made verbose, behaving like "cluck" and "confess",
respectively.
EXPORT
Nothing at all is exported.
ACKNOWLEDGMENTS
This module was born as a reaction to a release of Acme::JavaTrace by Sebastien Aperghis-Tramoni. Sebastien also has a newer module called
Devel::SimpleTrace with the same code and fewer flame comments on docs. The pruning of the uselessly long docs of this module were prodded
by Michael Schwern.
Schwern and others told me "the module name stinked" - it was called "Carp::Indeed". After thinking long and not getting nowhere, I went
with nuffin's suggestion and now it is called "Carp::Always". "Carp::Indeed" which is now deprecate lives in its own distribution (which
won't go anywhere but will stay there as a redirection to this module).
SEE ALSO
o Carp
o Acme::JavaTrace and Devel::SimpleTrace
o Carp::Always::Color
o Carp::Source::Always
Please report bugs via CPAN RT http://rt.cpan.org/NoAuth/Bugs.html?Dist=Carp-Always.
BUGS
Every (un)deserving module has its own pet bugs.
o This module does not play well with other modules which fusses around with "warn", "die", $SIG{'__WARN__'}, $SIG{'__DIE__'}.
o Test scripts are good. I should write more of these.
o I don't know if this module name is still a bug as it was at the time of "Carp::Indeed".
AUTHOR
Adriano Ferreira, <ferreira@cpan.org>
COPYRIGHT AND LICENSE
Copyright (C) 2005-2012 by Adriano R. Ferreira
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
perl v5.14.2 2012-04-18 Carp::Always(3pm)