Sponsored Content
Full Discussion: Trimming the spaces
Top Forums UNIX for Advanced & Expert Users Trimming the spaces Post 302212252 by sharif on Monday 7th of July 2008 04:43:01 AM
Old 07-07-2008
Trimming the spaces

Hi,
How can I remove the unwanted spaces in the line.
123456 789 ABC DEF. - I wanna remove the sapces in this line, I need the output 123456789ABCDEF.

Pls help me......
 

10 More Discussions You Might Find Interesting

1. Solaris

spaces trimming while assigning to a variable

Hi my lovely friends, Im writing one pgm in which i trying to assign some values like $var='Jun 6' but if i do echo of this $var will trim the spaces expect one space. $echo $var $Jun 6 But if var='Jun 28', then this will works fine $echo $var $Jun 28 this is required to exctract... (2 Replies)
Discussion started by: Lokesha
2 Replies

2. Shell Programming and Scripting

trimming white spaces

I have a variable that calls in a string from txt file. Problem is the string comes with an abundance of white spaces trailing it. Is there any easy way to trim the tailing white spaces off at the end? Thanks in advance. (9 Replies)
Discussion started by: briskbaby
9 Replies

3. UNIX for Advanced & Expert Users

trimming zeros

Hi, I want to trim +with leading zero's with amount fields.I know using awk for trimming leading zeros with +,but I want get the entire row itself. cat file_name |awk -F " " '{printf "%14.4f%f\n",$4}' ex: 10 xyz bc +00000234.4500 20 yzx foxic +002456.000 Expexted 10 xyz bc... (3 Replies)
Discussion started by: mohan705
3 Replies

4. Shell Programming and Scripting

trimming lines

hi have output as i have trim of lines before CREATE statement and lins after last ")" any idea how to achieve it ? (3 Replies)
Discussion started by: crackthehit007
3 Replies

5. Shell Programming and Scripting

trimming out spaces in solaris

friends, I have a script in solaris 10 SPARC system which is like this date '+Time: %m/%d/%y %H:%M:%S' echo " GDBRR GDLRR GDBWR GDLWR GDRRR GDRWR " sar -b 10 10 |/usr/xpg4/bin/awk '!/Average/ && !/SunOS/ && !/bread/ {$1="";T=$2;T1=$3;T2=$5;T3=$6;T4=$8;T5=$9}{print(T"\t",... (1 Reply)
Discussion started by: achak01
1 Replies

6. Shell Programming and Scripting

Trimming output

I'm trying to parse an output log and I've managed to reduce the output to the lines I need. But I'm having trouble pulling out only the info I'm interested in. The output is 40+ lines and here is a sample Installing AppFresh 0.8.5.pkg from ./InstallerFiles/CustomPKG/26 (26) Installing... (2 Replies)
Discussion started by: kaltekar
2 Replies

7. Shell Programming and Scripting

trimming sequences

My file looks like this: But I would like to 'trim' all sequences to the same lenght 32 characters, keeping intact all the identifier (>GHXCZCC01AJ8CJ) Would it be possible to use awk to perform this task? (2 Replies)
Discussion started by: Xterra
2 Replies

8. Shell Programming and Scripting

How can I stop the unix script from trimming extra spaces?

I have a file which contains certain records about users. the row length is always fixed to 205 characters. Now I want to read each record line from the file, substring some portion out of it and put into another file. But I have observed that my script is trimming the extra spaces I have used for... (4 Replies)
Discussion started by: Pramit
4 Replies

9. Shell Programming and Scripting

Trimming spaces from a variable

Hi guys, when I take substring of a particular data using this command var=substr($0,11,10) it comes with spaces, when I am trying to trim the spaces it is not allowing me to do that. Can you please help me out on that. As I have to reverse the output of the variable also. ---------- Post... (0 Replies)
Discussion started by: manish8484
0 Replies

10. Shell Programming and Scripting

Trimming Spaces in Unix

Hi All, I am using following script to name the file base of some values #!/bin/sh sourcefile=$1 awk ' BEGIN{ n = 1; name = "FILEFILE12" n ".txt"; } { if (substr($0,1,10) == "FILEFILE12") { close (name) n++ a = substr($0,11,10); b = substr($0,21,5); name = b "_Src_" a ".txt" }... (6 Replies)
Discussion started by: manish8484
6 Replies
libcaca-style(3caca)						      libcaca						      libcaca-style(3caca)

NAME
libcaca-style - Libcaca coding style General guidelines A pretty safe rule of thumb is: look at what has already been done and try to do the same. o Tabulations should be avoided and replaced with eight spaces. o Indentation is generally 4 spaces. o Lines should wrap at most at 79 characters. o Do not leave whitespace at the end of lines. o Do not use multiple spaces for anything else than indentation. o Code qui fait des warnings == code de porc == deux baffes dans ta gueule C coding style Try to use short names whenever possible (i for indices, w for width, cv for canvas...). Macros are always uppercase, variable and function names are always lowercase. Use the underscore to separate words within names: #define BROKEN 0 #define MAX(x, y) ((x > y) ? (x) : (y)) unsigned int x, y, w, h; char *font_name; void frobulate_every_three_seconds(void); const is a suffix. It's char const *foo, not const char *foo. Use spaces after commas and between operators. Do not use spaces after an opening parenthesis or before a closing one: a += 2; b = (a * (c + d)); x = min(x1, x2, x3); Do not put a space between functions and the corresponding opening parenthesis: int function(int); A space can be inserted after keywords such as for, while or if, but consistency with the rest of the page is encouraged: if(a == b) return; if (p == NULL) Do not put parentheses around return values: return a + (b & x) + d[10]; Opening braces should be on a line of their own, aligned with the current block. Braces are optional for one-liners: int function(int a) { if(a & 0x84) return a; if(a < 0) { return -a; } else { a /= 2; switch(a) { case 0: case 1: return -1; break; default: return a; } } } C++ coding style Nothing here yet. Version 0.99.beta18 Fri Apr 6 2012 libcaca-style(3caca)
All times are GMT -4. The time now is 08:34 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy