LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 03-06-2007, 08:39 AM   #1
Cigar
LQ Newbie
 
Registered: Jun 2003
Posts: 19

Rep: Reputation: 0
how to ouput ls result


Hi all,

sorry for taking your time I would like to know if someone could help me outputing my ls result to variable looks sample but can't make it

I would like something like ls *.avi | $toto but this doesn't work

any advice? thx in advance

Jo
 
Old 03-06-2007, 08:49 AM   #2
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Mint
Posts: 17,809

Rep: Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743
Your example is a "pipe"--in this construct, the entry after the "|" would need to be a command that expects an input.

Try this:
VARNAME=`ls`
(those are "backtics", not single quotes)
 
Old 03-06-2007, 09:41 AM   #3
Cigar
LQ Newbie
 
Registered: Jun 2003
Posts: 19

Original Poster
Rep: Reputation: 0
thx pixellany this what I was a looking for thx a lot works like a charm

Jo
 
  


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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Noise in tv sound ouput erpe Linux - Hardware 3 04-25-2006 05:53 PM
/etc/mtab input/ouput error cecollinsjr Fedora 1 04-14-2006 02:36 PM
question about ouput of ls -l Itzac Linux - Newbie 1 05-09-2004 04:18 PM
Speaker problem, digital ouput. Zeth_htp Linux - Hardware 4 01-04-2004 04:25 PM
SAR Ouput Question te_conway Linux - General 10 01-26-2003 09:29 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 07:47 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