10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
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
2. UNIX for Beginners Questions & Answers
I have a file like this.
hari,corporationbank,2234356,syndicate
ravi,indian bank,4567900000000,indianbank,accese
raju,statebank of hyderabad,565866666666666,pause
Here each record has different record length and there are blank spaces... (8 Replies)
Discussion started by: kshari8888
8 Replies
3. Shell Programming and Scripting
I have textfile (source.txt) with different length of lines in it. Can anybody help to compose a script under bash which would add suitable number of trailing spaces to the end of each line so that after the processing the each line would have the same (let's say 100 char) length? Output can be... (6 Replies)
Discussion started by: sameucho
6 Replies
4. Shell Programming and Scripting
I'm currently writing my sql results to a file and they have trailing spaces after each field. I want to get rid of these spaces and I'm using this code:
TVXTEMP=$(echo $TVXTEMP|sed -e 's/\ //g')
It doesn't work though. I'm not familiar with sedscript, and the other codes I've found online... (6 Replies)
Discussion started by: avillanueva
6 Replies
5. UNIX for Dummies Questions & Answers
I have a script wherein I access each line of the file using a FOR loop and then perform some operations in each line. The problem is each line that gets extracted in FOR loop truncates trailing blank spaces and control characters (^M) that is present at the end of each line. I don't wan this to... (5 Replies)
Discussion started by: Shobana_s
5 Replies
6. Shell Programming and Scripting
Hi,
I'm new to shell programming. Need some help in the following requirement:
I have a file origFile.txt with values:
origFile.txt
.00~ 145416.02~ xyz~ ram kishor
.35~ 765.76~ anh reid~ kishna kerry
Now each row in the file has value for 4 columns with "~" as... (7 Replies)
Discussion started by: badrimohanty
7 Replies
7. Shell Programming and Scripting
I want to remove the trailing spaces from any line of file.
line ending does not follow any pattern.
plz help (3 Replies)
Discussion started by: vikas_kesarwani
3 Replies
8. Shell Programming and Scripting
Hi Friends,
Can any one help with this issue:
How to trim spaces for each line at the end,
Like I have a file in this format.
EMP1 SMITH 46373 5 STREET HOWARD 74636
EMP2 JONES 5454 { these are spaces ........}
EMP3 SMITH 46373 5 STREET HOWARD 74636
EMP4 JON 2554 { these are... (1 Reply)
Discussion started by: sbasetty
1 Replies
9. UNIX for Dummies Questions & Answers
I have a text file which is not fixed width. I want to put trailing spaces to each line and make it a 100 byte fixed width file.
Can someone please help me as soon as possible?
Thanks,
Denis (1 Reply)
Discussion started by: 222001459
1 Replies
10. UNIX for Dummies Questions & Answers
Hi,
I am currently confused.
Suppose I have a file something like the one below.
4299|raj Telecommunications|12|||||
4302|anjali International Ltd.|86|ritchie||dong|(000)2890 9993 |(222)4881 3689
4305|フィデュシアリ・ト-スト・インター...ショ...ル投資顧問株式会社 |112||||01-9211-1931 |08-3677-1985
Now... (2 Replies)
Discussion started by: rooh
2 Replies