I have a text file which is not fixed width. I want to put trailing spaces to each line and make it a 100 byte fixed width file.
Can someone please help me as soon as possible?
Thanks,
Denis (1 Reply)
Hi,
I have a file like this
(ADD_MONTHS((Substr(Trim(BOTH FROM Translate(Maximum(closeDa
------------------------------------------------------------
2007-06-30 00:00:00
I have a requirement where i need just the date.
When i do: tail -1... (2 Replies)
Hi,
I am trying to remove trailing white spaces using this command in awk
nawk -F '|' '/^TR/{t = $4 }/^LN/{gsub(/ */,"");printf "%s|%s\n", t, $0 }' $i>>catman_852_files.txt
My delimiter is '|'.
THere are some description fields which are being truncated. I dont want to remove spaces... (1 Reply)
Dear All,
can you please advice how do i remove trailing and leading spaces from a pipe-delimited file using "tr" command
the below cmd, i tried removed all spaces
tr -d ' '<s1.txt>s2.txt1
Many thx
Suresh (5 Replies)
I am getting a value from a csv file using CUT command, however the command extracting the records with trailing spaces. I am using the result into a sql session to fetch data, because of the trailing spaces the sql session is unable to fetch any data.
Please let me know, how to remove this... (2 Replies)
HI,
I need the help from the experts like I have created one file with text like:
a b c d
e f g h
i j k l
So my question is that i have to write the script in which like in the first sentence it will take only one space after d and remove all the extra space in the end.I dont... (8 Replies)
Platform: Oracle Linux 6.5
I have a file with hundreds of values enclosed in single quotes like below. I want the trailing empty spaces before the ending quote to be removed. Expected output shown below. Can this be done using good old vi editor ? Or should I use sed or awk for this ?
$ cat... (4 Replies)
Hi,
I am trying to remove leading and trailing spaces from a file using awk but somehow I have not been able to do it.
Here is the data that I want to trim.
07/12/2017 15:55:00 |entinfdev |AD ping Time ms | .474| 1.41| .581|green |flat... (9 Replies)
Hi
I have variable named tablename. The value to tablename variable has leading and trailing white spaces. How to remove the leading and training white spaces and write the value of the tablename without space to a file using shell script. ( for e.g. tablename= yyy )
INPUT
... (10 Replies)
Discussion started by: pottic
10 Replies
LEARN ABOUT DEBIAN
dr::tarantool::spaces
DR::Tarantool::Spaces(3pm) User Contributed Perl Documentation DR::Tarantool::Spaces(3pm)NAME
DR::Tarantool::Spaces - spaces container
SYNOPSIS
use DR::Tarantool::Spaces;
my $s = new DR::Tarantool::Spaces({
1 => {
name => 'users', # space name
default_type => 'STR', # undescribed fields
fields => [
qw(login password role),
{
name => 'counter',
type => 'NUM'
},
{
name => 'something',
type => 'UTF8STR',
},
{
name => 'opts',
type => 'JSON',
}
],
indexes => {
0 => 'login',
1 => [ qw(login password) ],
2 => {
name => 'my_idx',
fields => 'login',
},
3 => {
name => 'my_idx2',
fields => [ 'counter', 'something' ]
}
}
},
0 => {
...
}
});
my $f = $s->pack_field('users', 'counter', 10);
my $f = $s->pack_field('users', 1, 10); # the same
my $f = $s->pack_field(1, 1, 10); # the same
my $ts = $s->pack_keys([1,2,3] => 'my_idx');
my $t = $s->pack_primary_key([1,2,3]);
DESCRIPTION
The package describes all spaces that You use. It supports the following field types:
NUM, NUM64, STR
- standard tarantool <http://tarantool.org> types.
UTF8STR
- the same as STR, but string will be utf8-decoded after extracting from database.
INT & INT64
- the same as NUM and NUM64, but contain signed values.
JSON
- the filed will be encoded by JSON::XS before inserting and decoded after extracting from database.
METHODS
new
my $spaces = DR::Tarantool::Spaces->new( $spaces );
space
Returns space object by number or name.
my $space = $spaces->space('name');
my $space = $spaces->space(0);
pack_field
packs one field before making database request
my $field = $spaces->pack_field('space', 'field', $data);
unpack_field
unpacks one field after extracting data from database
my $field = $spaces->unpack_field('space', 'field', $data);
pack_tuple
packs tuple before making database request
my $t = $spaces->pack_tuple('space', [ 1, 2, 3 ]);
unpack_tuple
unpacks tuple after extracting data from database
my $t = $spaces->unpack_tuple('space', @fields);
SPACES methods
new
constructor
use DR::Tarantool::Spaces;
my $space = DR::Tarantool::Space->new($no, $space);
name
returns space name
number
returns space number
pack_field
packs field before making database request
unpack_field
unpacks field after extracting data from database
pack_tuple
packs tuple before making database request
unpack_tuple
unpacks tuple after extracting data from database
COPYRIGHT AND LICENSE
Copyright (C) 2011 Dmitry E. Oboukhov <unera@debian.org>
Copyright (C) 2011 Roman V. Nikolaev <rshadow@rambler.ru>
This program is free software, you can redistribute it and/or
modify it under the terms of the Artistic License.
VCS
The project is placed git repo on github: https://github.com/unera/dr-tarantool/ <https://github.com/unera/dr-tarantool/>.
perl v5.14.2 2012-06-04 DR::Tarantool::Spaces(3pm)