How to remove a semi-repeating character in position 1 of a file
My file is in a good column format but several lines in the file begin with a zero. I'm in KSH and looking for a command to remove this zero and keep the text next to it. I don't want any of the zeros in the other columns removed.
Below is a snip from the file... all I need to do is remove that zero at the beginning of several lines. I can't seem to get cut or sed to work for me.
Hi,
I need to add Pipe (|) at 5th and 18th position of all records a file. How can I do this?
I tried to add it at 5th position using the below code. It didnt work. Please help!!!
awk '{substr($0,5,1) ~ /|/}{print}' $input_file > $temp_file (1 Reply)
I want a shell script that will traverse a file system starting at specific path.
And look at all file names for repeating sequences of and remove them from the file name.
The portion of the name that gets removed has to be a repeating sequence of the same characters.
So the script would... (3 Replies)
Hi!
I need to sort file by certain column (column position from-to).
I tried sort command, but it works wrong.
Example:
0001 5214521
0148 6712145
I need to sort this 2 lines by values from position 9 to 12 (bold)
Output:
0148 6712145
0001 5214521
Is there any way how to do this? (2 Replies)
Hi,
I have catenated multiple output files (from a monte carlo run) into one big output file. Each individual file has it's own two line header. So when I catenate, there are multiple two line headers (of the same wording) within the big file. How do I use the sed command to search for the... (1 Reply)
Greetings,
We have a requirement where we need to loop in a fixed width file in linux and remove a character based on a position for every record. It would highly appreciate if someone can help to automate this.
Appreciate your time and help!
Regards (3 Replies)
Greetings.
I have a file with information like this:
AMNDHRKEOEU?AMNDHRKEOEU?AMNDHRKEOEU?AMNDHRKEOEU?
AMNDHRKEEU?AMNDHREOEU?
AMNDHREU?AHRKEOEU?AMNDHRKEU?AMNDKEOEU?
What I need to extract is the position, in every line, of every occurrence of '?'
A desired output would be something... (6 Replies)
Hi All,
I want to remove " character if present in position 25th in CSV file. Each field in CSV file is separated by , and enclosed in "" (enclosed using double quotes)
For example
"1","2","3",........."123 Tom " is Good boy","26",........"45"
Where "1" first position character, ...... 25th... (8 Replies)
I will appreciate if you help me here in this script in Solaris Enviroment.
Scenario:
i have 2 files :
1) /tmp/TRANSACTIONS_DAILY_20180730.txt:
201807300000000004
201807300000000005
201807300000000006
201807300000000007
201807300000000008
2)... (10 Replies)
Discussion started by: teokon90
10 Replies
LEARN ABOUT DEBIAN
template::dbi
Template::DBI(3pm) User Contributed Perl Documentation Template::DBI(3pm)NAME
Template::DBI - DBI plugin for the Template Toolkit
SYNOPSIS
$ perldoc Template::Plugin::DBI
DESCRIPTION
The Template-DBI distribution contains the DBI plugin for the Template Toolkit. At some point in the future it is likely to contain other
DBI-related plugins and extension modules for the Template Toolkit.
The DBI plugin was distributed as part of the Template Toolkit until version 2.15 released in May 2006. At this time it was extracted into
this separate Template-DBI distribution.
See the documentation for Template::Plugin::DBI for further details on using the DBI plugin.
AUTHORS
The DBI plugin was originally written by Simon A Matthews, and distributed as a separate module. It was integrated into the Template
Toolkit distribution for version 2.00 and included contributions from Andy Wardley, Craig Barratt, Dave Hodgkinson and Rafael Kitover.
Andy Wardley extracted it back into a separate distribution in May 2006. After that, in 2010 Jens Rehsack maintains this distribution.
COPYRIGHT
Copyright (C) 1999-2006 Simon Matthews, Andy Wardley. All Rights Reserved
Copyright (C) 2010 Jens Rehsack. All Rights Reserved
This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
SEE ALSO
Template, Template::Plugins, Template::Plugin::DBI, DBI, Tie::DBI
perl v5.10.1 2011-02-05 Template::DBI(3pm)