Visit Jeremy's Blog.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 10-11-2011, 03:21 PM   #1
LQ Newbie
Registered: Oct 2011
Posts: 1

Rep: Reputation: Disabled
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

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

Last edited by HACKER_SEABASS; 10-11-2011 at 03:37 PM.
Old 10-11-2011, 03:26 PM   #2
LQ Guru
Registered: Apr 2005
Posts: 5,817

Rep: Reputation: 1002Reputation: 1002Reputation: 1002Reputation: 1002Reputation: 1002Reputation: 1002Reputation: 1002Reputation: 1002

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?


Old 10-11-2011, 04:33 PM   #3
LQ Newbie
Registered: May 2011
Distribution: Arch Linux
Posts: 25

Rep: Reputation: 13
Well, if you don't want the quotes around the filenames just skip the -Q flag..
Old 10-11-2011, 05:18 PM   #4
Senior Member
Registered: Jan 2010
Location: SI : 45.9531, 15.4894
Distribution: CentOS, OpenNA/Trustix, testing desktop openSuse 12.1 /Cinnamon/KDE4.8
Posts: 1,144

Rep: Reputation: 217Reputation: 217Reputation: 217
Originally Posted by roygbiiv View Post
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'"
Old 10-12-2011, 05:27 AM   #5
Registered: Oct 2011
Posts: 44

Rep: Reputation: Disabled
Just use ls.
Old 10-12-2011, 06:30 AM   #6
LQ Guru
Registered: Sep 2009
Location: Perth
Distribution: Manjaro
Posts: 9,506

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


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Find and Replace linuxtuxian Linux Mint 2 07-22-2011 01:31 PM
[SOLVED] Help with find/replace in vi Mr. Swillis Linux - Software 3 02-08-2010 01:57 PM
can't find my find command! how to replace? dave247 Debian 4 11-19-2008 10:51 AM
find and replace happy78 Programming 11 09-10-2005 10:21 AM
Find and Replace? duerra Linux - General 9 01-28-2004 04:07 AM

All times are GMT -5. The time now is 05:12 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration