LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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!

Notices


Reply
  Search this Thread
Old 10-11-2011, 03:21 PM   #1
HACKER_SEABASS
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
"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

Last edited by HACKER_SEABASS; 10-11-2011 at 03:37 PM.
 
Old 10-11-2011, 03:26 PM   #2
corp769
LQ Guru
 
Registered: Apr 2005
Location: /dev/null
Posts: 5,818

Rep: Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007
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
 
Old 10-11-2011, 04:33 PM   #3
roygbiiv
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
lithos
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
Quote:
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
linuxwin2
Member
 
Registered: Oct 2011
Posts: 44

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

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


Reply



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

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

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

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