Sponsored Content
Full Discussion: remove spaces
Top Forums Shell Programming and Scripting remove spaces Post 302668035 by Jimmy7 on Sunday 8th of July 2012 12:11:17 PM
Old 07-08-2012
remove spaces

Hi folks,
I need to remove spaces at the end of each line in a *.txt file. it looks like this

word 1[space]
word 2[space]
.
.
.
word n[space]

i found some sed commands but any of them didnt work so far

thank you for your posts
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

need help to remove spaces from first column

Hi, Here is sample data which I have: column#1 column#2 column#3 001A 50005 ROCKER ADJ 00010000100018UTIRR 001A 50020 CRANKSHAFT 0003445ES 001A 52201 SPARKPLUG ... (4 Replies)
Discussion started by: tayyabq8
4 Replies

2. UNIX for Dummies Questions & Answers

How to remove trailing spaces

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)
Discussion started by: mahek_bedi
2 Replies

3. Shell Programming and Scripting

Remove spaces from columns

I have a file with only one field something like this : 213.45 220.65 240.47 345.67 320.45 I want to remove all spaces in between. Is there any unix command for that ?Thanks in advance.. (2 Replies)
Discussion started by: jacks
2 Replies

4. Shell Programming and Scripting

Remove spaces before a delimiter

Hi All, I need to modify a script to remove spaces from a csv file. The csv file is delimited by the '~' character and I need to remove the spaces which appear before this character. i.e Sample input: LQ001 SWAT 11767727 ~9104 ~001 ~NIRSWA TEST 18 ~2 ~Standard Test ~0011 Desired... (5 Replies)
Discussion started by: SRyan84
5 Replies

5. Shell Programming and Scripting

Remove Spaces

Hi All, I have a comma seperated file. I wanna remove the spaces from column 2. I mean i don't wanna remove the spaces those are presnt in column 1. ex: emp name, emp no, salary abc k, abc 11, 1000 00 bhk s, bhk 22, 2000 00 the output should be: emp name, emp no, salary abc k, abc11,... (4 Replies)
Discussion started by: javeed7
4 Replies

6. Shell Programming and Scripting

Not able to remove leading spaces

Hi Experts, In a file tht i copied from the web , i am not able to remove the leading white spaces. I tried the below , none of them working . I opened the file through vi to check for the special characters if any , but no such characters found. Your advice will be greatly appreciated. sed... (5 Replies)
Discussion started by: panyam
5 Replies

7. Shell Programming and Scripting

Remove spaces in filenames

Hi, I have files like below, In files coming as spaces. Before transfering those files into ftp server. I want to remove the spaces and then can transfer the files into unix server. e.g: filenames are 1) SHmail _profile001_20120908.txt 2) SHmail_profile001 _20120908.txt 3) sh... (3 Replies)
Discussion started by: kirankumar
3 Replies

8. Linux

How to remove spaces in the file?

hiii i have a file that contains spaces in the begining of a file till the middle the from there the txt would appear. hw can i remove those spaces and bring the text to the begining portion file1 text starts from here (12 Replies)
Discussion started by: anurupa777
12 Replies

9. Shell Programming and Scripting

Remove spaces in a file

Hi friends, I have a file1.txt 1 | a | 4757634 | jund jdkj | erhyj 2 | a | 4757634 | jnd jdkj | rhje hjrhwj i have used tr -d '\040' to remove the spcaes output file cat file1.txt | tr -d '\040' 1|a|4757634|jundjdkj|erhyj... (5 Replies)
Discussion started by: i150371485
5 Replies

10. Shell Programming and Scripting

How to remove spaces on a line?

Hi, suppose I have the following data: albert music=top40 age=20 bob music=punk rock age=25 candy music=r n b age=22 dave music=mozart or bach only age=30 I want to extract and manipulate the music column but it's got spaces in it. How can I substitute the space with an underscore... (2 Replies)
Discussion started by: almonds
2 Replies
STORE(9)						   BSD Kernel Developer's Manual						  STORE(9)

NAME
store, subyte, suswintr, suword -- store data to user-space SYNOPSIS
#include <sys/types.h> #include <sys/time.h> #include <sys/systm.h> int subyte(void *base, int byte); int suword(void *base, long word); int suword16(void *base, int word); int suword32(void *base, int32_t word); int suword64(void *base, int64_t word); #include <sys/resourcevar.h> int suswintr(void *base, int word); DESCRIPTION
The store functions are designed to copy small amounts of data to user-space. The store routines provide the following functionality: subyte() Stores a byte of data to the user-space address base. suword() Stores a word of data to the user-space address base. suword16() Stores 16 bits of of data to the user-space address base. suword32() Stores 32 bits of of data to the user-space address base. suword64() Stores 64 bits of of data to the user-space address base. suswintr() Stores a short word of data to the user-space address base. This function is safe to call during an interrupt context. RETURN VALUES
The store functions return 0 on success or -1 on failure. SEE ALSO
copy(9), fetch(9) BSD
October 5, 2009 BSD
All times are GMT -4. The time now is 04:16 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy