10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
The following command works echo "some text with spaces" | sh -c 'sed -e 's/t//g''But this doesn't and should echo "some text with spaces" | sh -c 'sed -e 's/ //g''Any ideas? (3 Replies)
Discussion started by: Tribe
3 Replies
2. UNIX for Dummies Questions & Answers
Hi,
I need to correct href portion of the lines to edit out spaces from the line starting with position "<a href=" and ending at "target="
Below are 2 examples of extra space added by the server:
<td width=251 colspan=9 rowspan=22> <font size=2 face="courier"><tt><style>{font:7pt Courier ... (4 Replies)
Discussion started by: friedmi
4 Replies
3. Shell Programming and Scripting
Hi folks,
I need to remove spaces at the end of each line in a *.txt file. it looks like this
word 1
word 2
.
.
.
word n
i found some sed commands but any of them didnt work so far
thank you for your posts (6 Replies)
Discussion started by: Jimmy7
6 Replies
4. Shell Programming and Scripting
I have a file which contains certain records about users. the row length is always fixed to 205 characters.
Now I want to read each record line from the file, substring some portion out of it and put into another file. But I have observed that my script is trimming the extra spaces I have used for... (4 Replies)
Discussion started by: Pramit
4 Replies
5. Shell Programming and Scripting
Hi all,
i am getting count from oracle 11g by spooling it to a file.
Now there are some newline characters and blank spaces i need to remove these.
pl provide me a awk/sed solution.
the spooled file is attached.
i tried this.. but not getting req o/p (6 Replies)
Discussion started by: rishav
6 Replies
6. Shell Programming and Scripting
Input:
3456 565
656 878
235 8
4 8787
3 7
35 878
Expected output:
3456 565
656 878
235 8
4 8787
3 7
35 878
How can i do this with awk,sed and perl? (10 Replies)
Discussion started by: cola
10 Replies
7. Shell Programming and Scripting
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
8. Shell Programming and Scripting
seems easy but havent found in other posts...
i want to delete any spaces if found before first occurence of ${AI_RUN}
sed 's/ *\\$\\{AI_RUN\\}/\\$\\{AI_RUN\\}/' $HOME/temp1.dat
i think i'm close but can't put my finger on it. :rolleyes: (6 Replies)
Discussion started by: danmauer
6 Replies
9. Shell Programming and Scripting
Hello and thx for reading this
I'm using sed to remove only the leading spaces in a file
bash-280R# cat foofile
some text
some text
some text
some text
some text
bash-280R#
bash-280R# sed 's/^ *//' foofile > foofile.use
bash-280R# cat foofile.use
some text
some text
some text... (6 Replies)
Discussion started by: laser
6 Replies
10. Shell Programming and Scripting
Hello,
I have the following to remove spaces from beginning and end of a string.
infile=`echo "$infilename" | sed 's/^ *//;s/ *$//`
How do I modify the above code to remove spaces from beginning, end and in the middle of the string also.
ex:
... (4 Replies)
Discussion started by: radhika
4 Replies