Sponsored Content
Top Forums UNIX for Dummies Questions & Answers selective removal of blank spaces in string Post 302359896 by Cpt_Cell on Wednesday 7th of October 2009 04:05:40 PM
Old 10-07-2009
Thanks a lot for the quick reply and the solution!!!
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

remove blank spaces in a string

can any help how to remove blank spaces in a string? STR="GOOD BYE" by removing blank spaces, the string should be GOOD,BYE thanks in advance (2 Replies)
Discussion started by: spandu
2 Replies

2. UNIX for Dummies Questions & Answers

string with blank spaces

I have a file that has dates like this: date FINAL_RESULT; 7 date FINAL_RESULT; 2 date FINAL_RESULT; 5 With this command: seira=`cut -f2 -d\; tes.txt` i take the date FINAL RESULTs and i store them on variable seira.then seira look like this: 6 3 8 I want to read seira and make a sum of all... (4 Replies)
Discussion started by: psalas
4 Replies

3. Shell Programming and Scripting

Removing blank spaces, tab spaces from file

Hello All, I am trying to remove all tabspaces and all blankspaces from my file using sed & awk, but not getting proper code. Please help me out. My file is like this (<b> means one blank space, <t> means one tab space)- $ cat file NARESH<b><b><b>KUMAR<t><t>PRADHAN... (3 Replies)
Discussion started by: NARESH1302
3 Replies

4. Shell Programming and Scripting

Help with removal of blank spaces in a file

Hello.. I have a text file. I want to remove all the blank spaces(except tab) from the file.. I tried using sed command as shown below sed 's/ //g' file1 But the problem with the above command is that it also eliminates 'tab' which is between the columns.. For example if the contents... (7 Replies)
Discussion started by: abk07
7 Replies

5. Shell Programming and Scripting

Help with removal of blank spaces from the second field!

Hi everyone.. I'm trying to eliminate multiple whitespaces from a file.. I must make use of shell script to eliminate whitespaces.. Take a look at the sample file 1 int main() 2 { 3 int a,b; 4 printf("Enter the values of a and b"); 5 scanf("%d%d",&a,&b); 6 if(a>b) ... (6 Replies)
Discussion started by: abk07
6 Replies

6. Shell Programming and Scripting

Help with removal of spaces between operators and operands

Hi I'm trying to remove blank spaces in expressions and function calls.. Consider the following example printf ("Hello"); a = a + b; I'm trying to eliminate space in between the function name and the opening brace. And also eliminate space between operators and operands.. That is, I'm... (19 Replies)
Discussion started by: abk07
19 Replies

7. Shell Programming and Scripting

append blank spaces at the end of a variable string

Hello, could you please help with this one. I have an input file like this: 123,4567,89000 123456789,9876543,12 and for the output I need strings to be with the fixed length, let's say 15, and if the string is -lt 15 to be populated with blanks at the end until it reach 15, like this: 123 ,4567... (1 Reply)
Discussion started by: apenkov
1 Replies

8. Shell Programming and Scripting

Removal of extra spaces in *.log files to allow extraction of frequencies

Our university has upgraded its version of a computational chemistry program that our group uses quite regularly. In the past we have been able to extract frequency spectra from log files that are generated. Since the upgrade, the viewing program errors out. I've been able to trace down the changes... (16 Replies)
Discussion started by: wsuchem
16 Replies

9. UNIX for Advanced & Expert Users

Delete blank spaces and blank lines in a file

Hi Gurus, Somebody can say me how to delete blank spaces and blank lines in a file unix, please. Thank you for advanced. (10 Replies)
Discussion started by: systemoper
10 Replies

10. Shell Programming and Scripting

Add Blank Spaces in text, to perform beter alignment of the string

Hi Guru, I need some advice on how to add blank spaces to the code, rather than me just adding <space-bar spaces> which does not work. Current output of the code File System Backed Up - ALL_LOCAL_DRIVES Daily - Incremental Backup Schedule - 1 Month Retention • 7pm - PRD... (2 Replies)
Discussion started by: Junes
2 Replies
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)
All times are GMT -4. The time now is 06:57 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy