my shell now adds extra space at end of each line!


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting my shell now adds extra space at end of each line!
# 1  
Old 10-18-2012
my shell now adds extra space at end of each line!

Hi,

Since today, with csh or tcsh, if I do 'ls files* > list',
every lines end with an extra space!

What happenned?

What can I do to go back when there was no extra space?

If I change to bash, there's no extra space.


Thanks,

Patrick

---------- Post updated at 03:19 PM ---------- Previous update was at 02:17 PM ----------

One more thing that was working before :

$req = this string :
035="(OCoLC)742516066" OR 035="(OCoLC)742516257" OR 035="(OCoLC)785779093" OR 035="(OCoLC)708602160" OR 035="(OCoLC)742516066"

If I execute a script with $req as a paramater :
csh -f $aleph_proc/p_ret_03 UDQ01,exportfile,$req,

$req becomes only '035=@@034@@040OCoLC@@041742516066@@034'


**So it is cut after the first space.**

So a big problem with space!!!

What's wrong?

---------- Post updated at 03:51 PM ---------- Previous update was at 03:19 PM ----------

I fixed the $req problem with this quotes : "${req}"
As if the space was OK inside quotes.

But my main concern is the extra space at the end of each line, wtih 'ls files* > list'.
# 2  
Old 10-19-2012
Well, ls is doing the writing, so is it just ls? Is ls still just /bin/ls or has someone added an alias? Try ls with a full path to it. If that is it, then something about your $TERM has changed. It is not the shell, but might be the environment. Collect an stty -a and see what changes for diffrent shells.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX Desktop Questions & Answers

To remove the extra spaces at the end of each line in a file

I have a file of about 10k records and eace line is having an extra space of 5 byte at the end.. Iwant to remove the extra spaces at the end of each line.. Can someone please help me out.. I tried using sed command and its not working... can someone please help me out. (3 Replies)
Discussion started by: rammohan
3 Replies

2. Shell Programming and Scripting

How to Add space at the end of each line in linux

hi,. I am writing a small script in csh... Can any one tel me how to add space at end of each line in a file (9 Replies)
Discussion started by: Manju87
9 Replies

3. Shell Programming and Scripting

Remove line starting from space till end.

Hi, I have a code tag, from which i have the below snippet: intelrpt.GetCMB_FB type=ODBC> intelrpt.GetCMB_FB type=SYBASE> I want the output like: intelrpt.GetCMB_FB intelrpt.GetCMB_FB That is remove the lines starting from WHITESPACE till end. Please help. I am new to... (7 Replies)
Discussion started by: anupdas
7 Replies

4. Shell Programming and Scripting

m4 adds extra space at top of file.

I have used m4 in the past to generate source code where aesthetics and space were of no consequence . Now I am using it to generate script and program templates . So here is an excerpt from my m4 file for producing a generic bash script: dnl `$Id$' define(`START_SCRIPT',`#!/bin/bash... (8 Replies)
Discussion started by: Bubnoff
8 Replies

5. Shell Programming and Scripting

NULL in between, at begining or at end of line - convert to space

How to replace null with space? I want to make each line with 80 characters. If any line contains only 5 characters and remaining is null, then i want to make it as 80 characrets where 5 is original characters and remaining 75 characters will be null.. NULL can come in between the line,... (3 Replies)
Discussion started by: Amit.Sagpariya
3 Replies

6. Shell Programming and Scripting

Replace end of line with a space

for eg: i have i/p file as: ================ i wnt to change end of line ================= my require ouput is like: i wnt to change end of line ==================== (7 Replies)
Discussion started by: RahulJoshi
7 Replies

7. Shell Programming and Scripting

sed : replace space and end-of-line

Hi ! I'm rather new with sed ... learned a lot already by googling etc ... The following script should replace all spaces and ends-of-lines with "something (see below). #!/bin/bash i=0 while read line do fam="H`printf "%06d" $i`" echo $line | sed -e 's//\t'$fam'\n/g' i=$(($i+1))... (7 Replies)
Discussion started by: jossojjos
7 Replies

8. Shell Programming and Scripting

Add white space to the end of a line with sed

Im trying to add 5 blank spaces to the end of each line in a file in a sed script. I can figure out who o put the spaces pretty much anywhere else but at the end. thanks Karl (7 Replies)
Discussion started by: karlanderson
7 Replies

9. UNIX for Advanced & Expert Users

how can I read the space in the end of line

cat file1|while read i do echo "$i"|wc done with this command the space in the end of the line not considered how can solve that for example: read h "hgyr " echo "$h"|wc 4 (2 Replies)
Discussion started by: Ehab
2 Replies

10. Shell Programming and Scripting

to see space, tab, end of the line chracters

what can I use ?? In vi, I can use :set list <-- and see end of line $.. or use cat -A but I am wondering if there is command or program that allows me to see all the hidden characters( space, tab and etc) Please help thanks. (3 Replies)
Discussion started by: convenientstore
3 Replies
Login or Register to Ask a Question