LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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, 09: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, 09:49 AM   #2
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Arch/XFCE
Posts: 17,802

Rep: Reputation: 729Reputation: 729Reputation: 729Reputation: 729Reputation: 729Reputation: 729Reputation: 729
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, 10: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


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 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 06:53 PM
/etc/mtab input/ouput error cecollinsjr Fedora 1 04-14-2006 03:36 PM
question about ouput of ls -l Itzac Linux - Newbie 1 05-09-2004 05:18 PM
Speaker problem, digital ouput. Zeth_htp Linux - Hardware 4 01-04-2004 05:25 PM
SAR Ouput Question te_conway Linux - General 10 01-26-2003 10:29 AM


All times are GMT -5. The time now is 03: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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration