Sponsored Content
Full Discussion: Leading and Trailing Spaces
Top Forums Shell Programming and Scripting Leading and Trailing Spaces Post 42415 by Ygor on Wednesday 29th of October 2003 04:40:24 AM
Old 10-29-2003
Seems like you only want to remove only the spaces either side of a comma. Try...
Code:
echo "Amy Reds , 100 , /bin/sh" | sed 's/[ ]*,[ ]*/,/g'

 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Strip leading and trailing spaces only in a shell variable with embedded spaces

I am trying to strip all leading and trailing spaces of a shell variable using either awk or sed or any other utility, however unscuccessful and need your help. echo $SH_VAR | command_line Syntax. The SH_VAR contains embedded spaces which needs to be preserved. I need only for the leading and... (6 Replies)
Discussion started by: jerardfjay
6 Replies

2. UNIX for Dummies Questions & Answers

Removing leading and trailing spaces of data between the tags in xml.

I am having xml document as below. <transactionid> 00 </transactionid> <tracknumber> 0 </tracknumber> <key> N/A </key> But the data contains leading and trailing spaces between the tags. Please let me know how can i remove these leading and trailing spaces between the tags.... (2 Replies)
Discussion started by: jhmr7
2 Replies

3. Shell Programming and Scripting

remove trailing and leading spaces using tr command

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)
Discussion started by: sureshg_sampat
5 Replies

4. Shell Programming and Scripting

Removing leading and trailing spaces only in PERL

Hi All, I have a file with the following contents with multiple lines 172445957| 000005911|8| 400 Peninsula Ave.#1551 | And,K |935172445957|000005911 607573888 |000098536 | 2|Ane, B |J |Ane |1868 |19861206|20090106|20071001 I want to trim the "leading and trailing spaces only" from... (2 Replies)
Discussion started by: kumar04
2 Replies

5. Shell Programming and Scripting

[solved] Trailing spaces

Hello People How to check whether lines in a text file have trailing spaces or not and if a line have trailing spaces then how many trailing spaces line have? Regards ARvind kumar (5 Replies)
Discussion started by: arvindk.monu
5 Replies

6. Shell Programming and Scripting

Help to move leading negative sign to trailing position

Hi All, I am having a file which contains negative numbers, wht i am doing is re-formattting the file(moving few columns and add few hard codings between), while reformatting i would want the negative numbers to have the sign as trailing rather than leading. Existing -2400.00 34 0.00... (11 Replies)
Discussion started by: selvankj
11 Replies

7. Shell Programming and Scripting

Clearing leading and trailing blanks from a string in C Shell

Does anyone know of a way with C Shell that will work on both Linux and Sun to clear all leading and trailing blanks from a previously specified string? I am using the following code to replace blanks with underscores: set Company = `echo $Company | sed 's/ /_/g but I don't want any... (1 Reply)
Discussion started by: phudgens
1 Replies

8. Shell Programming and Scripting

Remove the leading and trailing date from a CSV file

I'm a newbie to shell scripting. Can anyone help with the below requirement ? The leading and trailing date of a files to be removed. 2017-07-12_gmr_tag_log_20170711.csv 2017-07-12_gmr_call_log_20170711.csv 2017-07-12_gmr_outgoing_log_20170711.csv I'm looking for output like... (7 Replies)
Discussion started by: shivamayam
7 Replies

9. Shell Programming and Scripting

Remove leading and trailing spaces from a file

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)
Discussion started by: svajhala
9 Replies

10. Shell Programming and Scripting

How to remove leading and trailing spaces for variable in shell script?

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
COBERTURA-CHECK(1)					      General Commands Manual						COBERTURA-CHECK(1)

NAME
cobertura-check -- show which classes do not have adequate test coverage SYNOPSIS
cobertura-check [--branch 0..100] [--datafile file] [--line 0..100] [--regex regex:branchrate:linerate] [--packagebranch 0..100] [--packageline 0..100] [--totalbranch 0..100] [--totalline 0..100] DESCRIPTION
cobertura-check can be run after your JUnit tests to show which classes do not have adequate test coverage. OPTIONS
If no parameters are specified then all values will be set to 50%. --branch 0..100 Specify the minimum acceptable branch coverage rate needed by each class. This should be an integer value between 0 and 100. Default value is 0. --datafile file Specify the name of the file containing metadata about your classes. Default value: "./cobertura.ser". --line 0..100 Specify the minimum acceptable line coverage rate needed by each class. This should be an integer value between 0 and 100. Default value is 0. --regex regex:branchrate:linerate For finer grained control, you can optionally specify minimum branch and line coverage rates for individual classes using any number of regular expressions. --packagebranch 0..100 Specify the minimum acceptable average branch coverage rate needed by each package. This should be an integer value between 0 and 100. Default value is 0. --packageline 0..100 Specify the minimum acceptable average line coverage rate needed by each package. This should be an integer value between 0 and 100. Default value is 0. --totalbranch 0..100 Specify the minimum acceptable average branch coverage rate needed by the project as a whole. This should be an integer value between 0 and 100. Default value is 0. --totalline 0..100 Specify the minimum acceptable average line coverage rate needed by the project as a whole. This should be an integer value between 0 and 100. Default value is 0. SEE ALSO
junit(1), cobertura-instrument(1), cobertura-report(1), cobertura-merge(1). AUTHOR
This manual page was written by Miguel Landaeta <miguel@miguel.cc> for the Debian system (but may be used by others). Permission is granted to copy, distribute and/or modify this document under the terms of the terms of GNU General Public License, Version 2 or any later version published by the Free Software Foundation. On Debian systems, the complete text of the GNU General Public License can be found in /usr/share/common-licenses/GPL. COBERTURA-CHECK(1)
All times are GMT -4. The time now is 10:32 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy