Sponsored Content
Top Forums Shell Programming and Scripting Modifying file from command line using Perl Post 302935186 by Walter Misar on Friday 13th of February 2015 09:44:43 AM
Old 02-13-2015
Use
Code:
(FULL|UPDATE|DELETE)

to define alternative strings, your example defines a character class.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Perl - Appending/Modifying Excel files

Hi I have been using Spreadsheet::ParseExcel and Spreadsheet::WriteExcel to read and write excel workbooks, respectively. Spreadsheet::WriteExcel can only be used for creating new excel spreadsheets. I am looking for a module that would/should help me in appending to existing excel files.... (2 Replies)
Discussion started by: srinivay
2 Replies

2. Shell Programming and Scripting

modifying perl script

Hi freinds I have a small problem I want u to help me in, I have a syslog server and configured it to send me email automatically, I get a small perl script to help me in, and tested it to send alerts to root and it worked successfully without any problems Now I want to send it outside, I... (4 Replies)
Discussion started by: reaky
4 Replies

3. Shell Programming and Scripting

Modifying a line

Hi, I am having trouble modifying this line. It is because there is a space that I dont know how to deal with. So the file looks like this >YM4911-Contig4 XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX >YM4915-Contig5 MMMMMMMMMMMMMMMMMMMMMMMMMMMMMM There are two spaces between contig#... (6 Replies)
Discussion started by: phil_heath
6 Replies

4. UNIX for Dummies Questions & Answers

Modifying a particulae data in a line contained in File

Hi, I have a file containing data: systemname/userid/password/comment systemname1/userid1/password1/comment1 systemname2/userid2/password2/comment2 I want to modify the "password" using script. Can anybody help me with this problem?:confused: (2 Replies)
Discussion started by: pgarg1989
2 Replies

5. UNIX for Dummies Questions & Answers

After modifying .cshrc file, ls: Command not found

I am using Redhat 4.1.2, tcsh shell To add a program to my path, I added the following line to my .cshrc file: set path = (/home/R/R-2.11.0/bin/ /home/R/R-2.11.0/library) It worked, I am able to run the program I wanted. But the pathway above overwrote all other existing paths - so I can no... (1 Reply)
Discussion started by: Euphoria
1 Replies

6. Shell Programming and Scripting

perl/unix: script in command line works but not in perl

so in unix this command works works and shows me a list of directories find . -name \*.xls -exec dirname {} \; | sort -u | > list.txt but when i try running a perl script to run this command my $query = 'find . -name \*.xls -exec dirname {} \; | sort -u | > list.txt';... (2 Replies)
Discussion started by: kpddong
2 Replies

7. Shell Programming and Scripting

Can't Output Piped Perl In-line command to a File

Hello, I'm pretty stumped, and I don't know why I am not able to redirect the output to the 'graphme' file with the command below in Fedora 18. tcpdump -l -n -t "tcp == 18" | perl -ane '($s,$j)=split(/,/,$F,2); print "$s\n";' > graphme In case you're wondering, I was following the example... (2 Replies)
Discussion started by: ConcealedKnight
2 Replies

8. Shell Programming and Scripting

Command Line Perl for parsing fasta file

I would like to take a fasta file formated like >0001 agttcgaggtcagaatt >0002 agttcgag >0003 ggtaacctga and use command line perl to move the all sample gt 8 in length to a new file. the result would be >0001 agttcgaggtcagaatt >0003 ggtaacctga cat ${sample}.fasta | perl -lane... (2 Replies)
Discussion started by: jdilts
2 Replies

9. Shell Programming and Scripting

Modifying bash script to take each line in a file and execute command

I need to modify a bash script to to take each line in a file and execute command. I currently have this: #!/bin/bash if ; then echo "Lipsa IP"; exit; fi i=1 ip=$1 while ; do if ; then rand=`head -$i pass_file | tail -1` user=`echo $rand | awk '{print $1}'` pass=`echo $rand | awk '{print $2}'`... (3 Replies)
Discussion started by: galford
3 Replies

10. Shell Programming and Scripting

Perl command line option '-n','-p' and multiple files: can it know a file name of a printed line?

I am looking for help in processing of those options: '-n' or '-p' I understand what they do and how to use them. But, I would like to use them with more than one file (and without any shell-loop; loading the 'perl' once.) I did try it and -n works on 2 files. Question is: - is it possible to... (6 Replies)
Discussion started by: alex_5161
6 Replies
SQL::Translator::Producer::PostgreSQL(3pm)		User Contributed Perl Documentation		SQL::Translator::Producer::PostgreSQL(3pm)

NAME
SQL::Translator::Producer::PostgreSQL - PostgreSQL producer for SQL::Translator SYNOPSIS
my $t = SQL::Translator->new( parser => '...', producer => 'PostgreSQL' ); $t->translate; DESCRIPTION
Creates a DDL suitable for PostgreSQL. Very heavily based on the Oracle producer. Now handles PostGIS Geometry and Geography data types on table definitions. Does not yet support PostGIS Views. PostgreSQL Create Table Syntax CREATE [ [ LOCAL ] { TEMPORARY | TEMP } ] TABLE table_name ( { column_name data_type [ DEFAULT default_expr ] [ column_constraint [, ... ] ] | table_constraint } [, ... ] ) [ INHERITS ( parent_table [, ... ] ) ] [ WITH OIDS | WITHOUT OIDS ] where column_constraint is: [ CONSTRAINT constraint_name ] { NOT NULL | NULL | UNIQUE | PRIMARY KEY | CHECK (expression) | REFERENCES reftable [ ( refcolumn ) ] [ MATCH FULL | MATCH PARTIAL ] [ ON DELETE action ] [ ON UPDATE action ] } [ DEFERRABLE | NOT DEFERRABLE ] [ INITIALLY DEFERRED | INITIALLY IMMEDIATE ] and table_constraint is: [ CONSTRAINT constraint_name ] { UNIQUE ( column_name [, ... ] ) | PRIMARY KEY ( column_name [, ... ] ) | CHECK ( expression ) | FOREIGN KEY ( column_name [, ... ] ) REFERENCES reftable [ ( refcolumn [, ... ] ) ] [ MATCH FULL | MATCH PARTIAL ] [ ON DELETE action ] [ ON UPDATE action ] } [ DEFERRABLE | NOT DEFERRABLE ] [ INITIALLY DEFERRED | INITIALLY IMMEDIATE ] Create Index Syntax CREATE [ UNIQUE ] INDEX index_name ON table [ USING acc_method ] ( column [ ops_name ] [, ...] ) [ WHERE predicate ] CREATE [ UNIQUE ] INDEX index_name ON table [ USING acc_method ] ( func_name( column [, ... ]) [ ops_name ] ) [ WHERE predicate ] SEE ALSO
SQL::Translator, SQL::Translator::Producer::Oracle. AUTHOR
Ken Youens-Clark <kclark@cpan.org>. perl v5.14.2 2012-01-18 SQL::Translator::Producer::PostgreSQL(3pm)
All times are GMT -4. The time now is 01:39 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy