Need help!


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Need help!
# 1  
Old 11-30-2010
Need help!

How would you find all of the files in your home directory that contain the word "prompt".

I was also wondering

Say that you transfer a file from the PC and find that it contains several occurrences of ^M, a non-printing character that represents the carriage return character. I need a shell script that will use sed to remove all occurrences of this character from a file.
# 2  
Old 11-30-2010
Code:
cd ; find ./ -name "*prompt*"

to remove ^M:
Code:
dos2unix filename filename

or
Code:
tr -d '\r' <filename >filename.tmp ; cat filename.tmp >filename ; rm filename.tmp

This User Gave Thanks to ctsgnb For This Post:
# 3  
Old 11-30-2010
Thanks for the quick reply I am going over some thing for my finals. I have some ideas about the things but am not confident.

what about this can I change the value of a command line variable, such as $1, inside a shell program?
# 4  
Old 11-30-2010
Show us the initial code, as well as the modified code, then we can see if your modification seems harmless to us.
 
Login or Register to Ask a Question

Previous Thread | Next Thread
Login or Register to Ask a Question