Sponsored Content
Top Forums UNIX for Dummies Questions & Answers Need help removing leading spaces from one field in comma seperated file Post 302655659 by joeyg on Wednesday 13th of June 2012 01:15:45 PM
Old 06-13-2012
Your example only showed this occurring once; not sure if it occurs outside of that 6th column. But...

Code:
echo 40,123456-02,160,05/24/2012,02/13/1977, 10699.15,0 | sed 's/, /,/'
40,123456-02,160,05/24/2012,02/13/1977,10699.15,0

 

10 More Discussions You Might Find Interesting

1. 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

2. UNIX for Dummies Questions & Answers

Search and then concat 4m other file (comma seperated)

My query is now a bit simplified. file1.txt names; ID; value1 ; values N; ABC; 1 ; a18 ; ... CDF; 2 ; b16 ; .. ABC; 1 ; c13 ; ...... EFG; 3 ;d12 ; ... file2.txt ID(Unique);smVals; smVal1; smVal N; 1; ...; ...; ...; 2; ..; ..; ..; 3; ..; ..; ..; ... (1 Reply)
Discussion started by: szchmaltz
1 Replies

3. 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

4. Shell Programming and Scripting

Removing blank lines from comma seperated and space seperated file.

Hi, I want to remove empty/blank lines from comma seperated and space seperated files Thanks all for help (11 Replies)
Discussion started by: pinnacle
11 Replies

5. Shell Programming and Scripting

Trimming fields for comma or pipe seperated file

I have file like this FileA: abc , "helloworld" , america def,asia, japan ghi, africa, ipl Output Needed: abc,"helloworld",america def,asia,japan ghi,africa,ipl I would like to implement using awk. I want to trim each field for its leading and trailing spaces. (7 Replies)
Discussion started by: pinnacle
7 Replies

6. Solaris

removing special characters, white spaces from a field in a file

what my code is doing, it is executing a sql file and the resullset of the query is getting stored in the text file in a fixed format. for that fixed format i have used the following code:: Code: awk -F":"... (2 Replies)
Discussion started by: priyanka3006
2 Replies

7. Shell Programming and Scripting

Removing leading spaces from the variable value.

Hi All, I am trying to replace the value of a xml tag with a new one. But, the existing value in the xml contain leading spaces and I tried to remove that with different sed commands but all in vain. For replacing the value I wrote the command in BOLD letters below: bash-3.00$... (3 Replies)
Discussion started by: khedu
3 Replies

8. Shell Programming and Scripting

Convert comma seperated file to line seperated.

Hi, I have data like this. 1,2,3,4 Output required: 1 2 3 4 I am trying to use tr function but getting error. Help is appreciated. (6 Replies)
Discussion started by: pinnacle
6 Replies

9. Shell Programming and Scripting

Need Help in rearranging the content of a file comma seperated

I have a file with the below content a = test1 b = test2 a = test3 b= test4 c = test6 b = test5 d = test7 d = test9 Need the output to be as follows a = test1,test3 b = test2, test5 c = test6 d = test7, test9 (4 Replies)
Discussion started by: iron_michael86
4 Replies

10. Shell Programming and Scripting

awk to parse comma separated field and removing comma in between number and double quotes

Hi Experts, Please support I have below data in file in comma seperated, but 4th column is containing comma in between numbers, bcz of which when i tried to parse the file the column 6th value(5049641141) is being removed from the file and value(222.82) in column 5 becoming value of column6. ... (3 Replies)
Discussion started by: as7951
3 Replies
GAMMU-SMSD-INJECT(1)						       Gammu						      GAMMU-SMSD-INJECT(1)

NAME
gammu-smsd-inject - Inject messages into queue of SMS daemon for Gammu SYNOPSIS
gammu-smsd-inject [OPTION]... MESSAGETYPE RECIPIENT [MESSAGE_PARAMETER]... DESCRIPTION
This manual page documents briefly the gammu-smsd-inject command. gammu-smsd-inject is a program that enqueues message in Gammu SMS Daemon, which will be later sent by the daemon using connected GSM modem. Support for this program depends on features available in currently used SMSD service backend, however currently it is supported by all of them. Program accepts following options (please note that long options might be not accepted on some platforms): -h, --help Shows help. -v, --version Shows version information and compiled in features. -c, --config=file Configuration file to use, default is /etc/gammu-smsdrc, on Windows there is no default and configuration file path has to be always specified. -l, --use-log Use logging as configured in config file. -L, --no-use-log Do not use logging as configured in config file (default). For description of message types and their parameters, please check documentation for gammu savesms. EXAMPLES
To check it out, you need to have configuration file for SMSD, see gammu-smsdrc for more details about it. Inject text message up to standard 160 chars: echo "All your base are belong to us" | gammu-smsd-inject TEXT 123456 or gammu-smsd-inject TEXT 123456 -text "All your base are belong to us" Inject long text message: echo "All your base are belong to us" | gammu-smsd-inject TEXT 123456 -len 400 or gammu-smsd-inject TEXT 123456 -len 400 -text "All your base are belong to us" or gammu-smsd-inject EMS 123456 -text "All your base are belong to us" Inject some funky message with predefined sound and animation from 2 bitmaps: gammu-smsd-inject EMS 123456 -text "Greetings" -defsound 1 -text "from Gammu" -tone10 axelf.txt -animation 2 file1.bmp file2.bmp Inject protected message with ringtone: gammu-smsd-inject EMS 123456 -protected 2 -variablebitmaplong ala.bmp -toneSElong axelf.txt -toneSE ring.txt AUTHOR
Michal iha <michal@cihar.com> COPYRIGHT
2009-2012, Michal iha <michal@cihar.com> 1.31.90 February 24, 2012 GAMMU-SMSD-INJECT(1)
All times are GMT -4. The time now is 05:47 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy