after sed command file shows '????' question marks


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting after sed command file shows '????' question marks
# 1  
Old 10-12-2012
after sed command file shows '????' question marks

Hi All,

I am trying to replace a string in a oracle LDT file file extension .ldt.
I am using the following command:

Code:
sed  "s/Test Number Viewer/Test Number 1/g" TEST_LIEN_FORM.ldt > TEST_LIEN_FORM.ldt.tmp
mv TEST_LIEN_FORM.ldt.tmp TEST_LIEN_FORM.ldt

But after the command, the file shows

Code:
?s/Test Number 1/Test Number 1/g
?
?
?
?
?
?
?
?
?
?
?
?
?
?
?
?
?


And the original content is lost.

Please suggest!

Thanks,
Veena

Last edited by Scott; 10-12-2012 at 03:19 AM.. Reason: Code tags
# 2  
Old 10-12-2012
is TEST_LIEN_FORM.ldt ascii file ?

Dont you have backup ?
# 3  
Old 10-12-2012
And just a wild question, you tried sed or ed?
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Replacing punctuation marks with the help of sed

#!/bin/bash a=(*.pdf) punct=((~`!@#$%^&*()_-+=|\{};':",./<>?)) for (( i =0; i < ${#a}; i++ )) do sed -ri 's/$punct//g' ${a} done I cannot use the above code, can you help me in removing all punctuation marks from file name except file extension. The idea is that once all... (9 Replies)
Discussion started by: ambijat
9 Replies

2. Shell Programming and Scripting

sed command question

Hey all, so I've been experimenting with SED today, no experience before today, so if you're not patient, stop reading now! :P I will attempt to explain this as simply as possible, without having to post massive walls of shitty code. Basically, I've created a small sed script to go through an... (9 Replies)
Discussion started by: Parrakarry
9 Replies

3. UNIX Desktop Questions & Answers

What is the way to get a total count of students and with highest marks from a file?

I have different things that I was trying to do but am kind of struggling with this since I'm a Linux noob. I have a files with student names ,marks,year school the . What is the most efficient way to get a total count of students and student with highest marks Initially I tried to get a count... (1 Reply)
Discussion started by: anil2103
1 Replies

4. Shell Programming and Scripting

Sed command garbled question

for j in $(cat ${list_B}) do to_replace_2=$(grep $j ${useralias}_2) sed "s/^${j}/${to_replace_2}/p" ${entries} > ${entries}_2 mv ${entries}_2 ${entries} done Hi, I've the above sed command running in a script. Its basically looping through a file and replacing its beginning of line... (8 Replies)
Discussion started by: Jazmania
8 Replies

5. Shell Programming and Scripting

Question about a sed command

Hi guys, I'm currently trying to understand a piece of shell script and it has some sed commands. I've been looking through sed tutorials to figure out what it does but still no luck :confused: Can any of you guys tell me what this particular command does? sed -i '1i\.options' a/* ... (1 Reply)
Discussion started by: chu816
1 Replies

6. UNIX for Dummies Questions & Answers

Question on my sed command

So I have this sed command below. The content of the tmp.txt file is dv01:at01,at05,at02:at04 sed 's/\:.*\,/\,/g' tmp.txt Which produces dv01,at02:at04 and I'm trying to use sed to get me dv01,at05,at02 Stripping out the parts leading with ":". My sed is pretty basic, can... (5 Replies)
Discussion started by: J-Man
5 Replies

7. Shell Programming and Scripting

'sed' command shows extra line

Here is an interesting problem that I am seeing when using 'sed'. The goal is to print out the names of the Oracle SID's on a system and here is the command I am using: ps -ef|grep ora|grep pmon|awk '{print $NF}'|sed 's/ora_pmon_//' The output of the command after the awk is this: ... (3 Replies)
Discussion started by: soleil4716
3 Replies

8. Solaris

Question marks appearing instead of text entered

I have a netscape 4.79 browser for our GUI which connects to a Solaris5.8 box. During peek hours, we see question marks appearing in the screen instead of the text we enter. This results in query failure. This problem does not happen always, and is quite irritating because, we have to close the... (6 Replies)
Discussion started by: vanz
6 Replies

9. AIX

ShellScript displays un necessary question marks

Hi, This is suman. I am very new to Shell Scripting. I have a shell script, when I run that script, it is displaying un necessary question marks. But in the scritpt, there is no any " echo ? " statement. Can anybody please help me what could be the cause for displaying question marks ?? ... (3 Replies)
Discussion started by: clnsharma123
3 Replies

10. UNIX for Dummies Questions & Answers

Question Marks in ed

I typed the following commands: 176 lab2-37:~> ed newb.txt 74 1,6p Hello Hello World. I need some sentences to edit. add the script OK Fn 2,4c . 1,3p Hello add the script OK Fn q ? (4 Replies)
Discussion started by: endeavour1985
4 Replies
Login or Register to Ask a Question