Sponsored Content
Full Discussion: Perl formatting.
Top Forums Shell Programming and Scripting Perl formatting. Post 302613369 by som.nitk on Tuesday 27th of March 2012 07:00:50 AM
Old 03-27-2012
Dosent seem to work with the following:

Code:
 
$ echo "60000005,MAT CON DEPT-DB,,1,N" | perl -plne 's/([^,]+(,[^,]+){3}).*$/$1/'
60000005,MAT CON DEPT-DB,,1,N

 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

text file formatting by perl

have a simple text file as input.i have to print that file in paragraph format.whenevr it finds "\n" in the input text it should start printing in next paragraph in output file.also a fixed amount of space should be given before start writing in every paragraph. the input and output file format... (5 Replies)
Discussion started by: avik1983
5 Replies

2. Shell Programming and Scripting

Text formatting in Perl.

Hiho, I've got a variable $sth = `du -sh /home/$whoami`; where $whoami is actually logged user. I want to have only the size of this directory eg. 2,7G. I know its lame, but anyway.. how to do it? (2 Replies)
Discussion started by: fenox
2 Replies

3. Shell Programming and Scripting

PERL: Modify Excel cell formatting

Hi, I would like to modify an existing excel cell format to a custom format. Is there a way to do it with out writing into a new excel file. In-place editing? Thanks (0 Replies)
Discussion started by: sandeep78
0 Replies

4. Shell Programming and Scripting

Formatting Perl Output

Hi, I am getting the output from a PERL program but the output is all on different lines. My code is printf hOUT "%s\t%s\t%s\t%s\t%s\t%s",$M1_CTR, $M2_CTR, $M3_CTR, $M4_CTR, $M5_CTR, $M6_CTR; Example: My report (which I send via email) should look like this Area 1 Area 2 ... (4 Replies)
Discussion started by: nurani
4 Replies

5. Shell Programming and Scripting

perl ssh2 output formatting

Hi Experts, I am using following format for Perl SSH2 commands. #!/usr/bin/perl -w use Net::SSH::Perl; use POSIX; use Sys::Hostname; use Term::ANSIColor qw(:constants); use strict; #my $host="10.128.0.214"; my @nodeip = ("10.128.0.214","10.128.0.215") ; my %node =... (7 Replies)
Discussion started by: mtomar
7 Replies

6. Shell Programming and Scripting

date formatting in perl

my code: $dateformat = yyyy_mm_dd if($dateformat =~ m/yyyy/i) { print ("found"); $yyyy = strftime "%Y", localtime; print ("year is $yyyy\n"); $dateformat =~ s/yyyy/$yyyy/; print ("new date format is $dateformat\n"); } elsif($dateformat =~ m/yy/i) { print ("found"); $yy = strftime "%y",... (4 Replies)
Discussion started by: irudayaraj
4 Replies

7. UNIX for Dummies Questions & Answers

Explain perl formatting commands

Could you please tell the meaning of Below mentioned perl script lines: format OWNER_TOTAL = @< Owner Code @<<<<<<total: @#######.## @#######.## @#######.## @#######.## @#######.## @#######.## @#######.## @#######.## @#######.## @#######.## @###### #.## $prev_cust_type, $prev_owner_code,... (2 Replies)
Discussion started by: vinothrajan55
2 Replies

8. Shell Programming and Scripting

Perl syntax for formatting columns and text

Dear all, Pzl let me know what is the syntax for converting the columns format to text as i have lots of values for but when i put these values in xls sheet the values are automatically converted to and one more question i have is how to call values from shell script into perl script eg. ... (3 Replies)
Discussion started by: sagar_1986
3 Replies

9. UNIX for Advanced & Expert Users

Help with Formatting date in Perl

Good day. I am trying to change the output on my date so that I can get the month as a numeric value. TODAY=`perl -e 'print localtime(time()) . "\n" '` Here are the results from the above perl statement Thu Feb 11 13:16:40 2016 I am not sure of the syntax to get a date more like... (2 Replies)
Discussion started by: ziggy6
2 Replies

10. Shell Programming and Scripting

Perl array formatting

Experts, I'm having problems with a portion of my perl script. I have a perl array that contains the following: Port1,circuit3,2;4 Port2,circuit1,9;6 Port3,circuit2,12;5 Port4,circuit4,11;10;3 Port5,circuit7,8;7;1 I'm trying to produce the following output: (3 Replies)
Discussion started by: timj123
3 Replies
METADATA(1)							   User Commands						       METADATA(1)

NAME
MAT - Metadata Anonymisation Toolkit SYNOPSIS
mat [options] files mat-gui DESCRIPTION
The Metadata Anonymisation Toolkit is a lib (with a CLI and a GUI) created to anonymise file's metadata. In essence, metadata answer who, what, when, where, why, and how about every face of the data that are being documented. They can be a risk for privacy. OPTIONS
-h, --help show this help message and exit -a, --add2archive Add to outputed archive non-supported filetypes -b, --backup Keep a backup copy -c, --check Check if a file is free of harmful metadatas -d, --display List all the harmful meta of a file without removing them -f, --force Don't check if files are clean before cleaning -l, --list List all supported fileformat -v, --version Display version and exit EXAMPLES
mat --display mydocument.pdf Display the mydocument.pdf's harmful metadata mat --check *.jpg Check all the jpg images from the current folder NOTES
MAT only process metadata, it does not handle file data. Blame yourself if you are traced back because of the data of your files. MAT is not perfect : In most of the cases, a forensic expert with a lot of time can trace back your document. If you want absolute privacy, use plain-text. AUTHOR
Julien (jvoisin) Voisin <pouicpouicpouic@gmail.com>, during the GSoC 2011 BUGS
MAT does not handle watermaking/tattoo for now. SEE ALSO
exiftool, hachoir-metadata Metadata Anonymisation Toolkit August 2011 METADATA(1)
All times are GMT -4. The time now is 03:15 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy