LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   find and replace (https://www.linuxquestions.org/questions/linux-newbie-8/find-and-replace-907640/)

HACKER_SEABASS 10-11-2011 03:21 PM

find and replace
 
i am trying to get the listing of all ordinary files names i can get the names but i need to remove some of the extra text

ls -Q
"fileName"

this is the command i am using i want to get ride of the quotes have it just display the name. I am using this in a script so any help would be appreciated

corp769 10-11-2011 03:26 PM

Hello,

Hold on... Are you saying you want to get rid of everything in quotes? I can not quite understand your explanation here... Could you possibly read over what you said, and edit your post so it makes more sense?

Cheers,

Josh

roygbiiv 10-11-2011 04:33 PM

Well, if you don't want the quotes around the filenames just skip the -Q flag..

lithos 10-11-2011 05:18 PM

Quote:

Originally Posted by roygbiiv (Post 4495852)
Well, if you don't want the quotes around the filenames just skip the -Q flag..

or use "$ ls -al"

or "ls -Q | sed 's/"//g'"

linuxwin2 10-12-2011 05:27 AM

Just use ls.

grail 10-12-2011 06:30 AM

More information might be required as the parsing of ls in a script is generally a bad idea, see here.


All times are GMT -5. The time now is 09:00 PM.