input of pwd and ls -l in a file without using >>

input of pwd and ls -l in a file without using >>

am 28.11.2007 10:36:02 von Nix

Hello,

How can I give input of pwd and ls -l in a file without using >> ?
The content of the file should be like this;
------------------------------------------------------------ ---------
/home/crbt/prac
-rw-rw-r-- 1 crbt crbt 0 Nov 28 12:59 lst
-rw-rw-r-- 1 crbt crbt 29 Nov 28 12:44 now
------------------------------------------------------------ ------------
Thanx........ :-)

Re: input of pwd and ls -l in a file without using >>

am 28.11.2007 11:48:36 von Barry Margolin

In article
<2dd3d68f-bd2c-4391-8e36-c8a978b3589f@e25g2000prg.googlegroups.com>,
nix wrote:

> Hello,
>
> How can I give input of pwd and ls -l in a file without using >> ?
> The content of the file should be like this;
> ------------------------------------------------------------ ---------
> /home/crbt/prac
> -rw-rw-r-- 1 crbt crbt 0 Nov 28 12:59 lst
> -rw-rw-r-- 1 crbt crbt 29 Nov 28 12:44 now
> ------------------------------------------------------------ ------------
> Thanx........ :-)

{ pwd; ls -l ; } > file
--
Barry Margolin
Arlington, MA

Re: input of pwd and ls -l in a file without using >>

am 29.11.2007 06:09:45 von Nix

On Nov 28, 3:48 pm, Barry Margolin wrote:
> In article
> <2dd3d68f-bd2c-4391-8e36-c8a978b35...@e25g2000prg.googlegroups.com>,
>
> nix wrote:
> > Hello,
>
> > How can I give input of pwd and ls -l in a file without using >> ?
> > The content of the file should be like this;
> > ------------------------------------------------------------ ---------
> > /home/crbt/prac
> > -rw-rw-r-- 1 crbt crbt 0 Nov 28 12:59 lst
> > -rw-rw-r-- 1 crbt crbt 29 Nov 28 12:44 now
> > ------------------------------------------------------------ ------------
> > Thanx........ :-)
>
> { pwd; ls -l ; } > file
> --
> Barry Margolin
> Arlington, MA

I've made a mistake.
The words "give" and "input" must be changed to "get" and "output"
so plz read the following
"How can I get the output of pwd and ls -l in a file without using
>> ?

Re: input of pwd and ls -l in a file without using >>

am 29.11.2007 13:45:11 von Ed Morton

On 11/28/2007 11:09 PM, nix wrote:
> On Nov 28, 3:48 pm, Barry Margolin wrote:
>
>>In article
>><2dd3d68f-bd2c-4391-8e36-c8a978b35...@e25g2000prg.googlegroups.com>,
>>
>> nix wrote:
>>
>>>Hello,
>>
>>>How can I give input of pwd and ls -l in a file without using >> ?
>>>The content of the file should be like this;
>>>--------------------------------------------------------- ------------
>>>/home/crbt/prac
>>>-rw-rw-r-- 1 crbt crbt 0 Nov 28 12:59 lst
>>>-rw-rw-r-- 1 crbt crbt 29 Nov 28 12:44 now
>>>--------------------------------------------------------- ---------------
>>>Thanx........ :-)
>>
>>{ pwd; ls -l ; } > file
>>--
>>Barry Margolin
>>Arlington, MA
>
>
> I've made a mistake.
> The words "give" and "input" must be changed to "get" and "output"
> so plz read the following
> "How can I get the output of pwd and ls -l in a file without using
>
>>>?
>>

That IS what we all assumed you meant. Did you try the solution Barry gave you?

Ed.

Re: input of pwd and ls -l in a file without using >>

am 03.12.2007 09:05:02 von Nix

On Nov 29, 5:45 pm, Ed Morton wrote:
> On 11/28/2007 11:09 PM, nix wrote:
>
>
>
>
>
> > On Nov 28, 3:48 pm, Barry Margolin wrote:
>
> >>In article
> >><2dd3d68f-bd2c-4391-8e36-c8a978b35...@e25g2000prg.googlegroups.com>,
>
> >> nix wrote:
>
> >>>Hello,
>
> >>>How can I give input of pwd and ls -l in a file without using >> ?
> >>>The content of the file should be like this;
> >>>--------------------------------------------------------- ------------
> >>>/home/crbt/prac
> >>>-rw-rw-r-- 1 crbt crbt 0 Nov 28 12:59 lst
> >>>-rw-rw-r-- 1 crbt crbt 29 Nov 28 12:44 now
> >>>--------------------------------------------------------- ---------------
> >>>Thanx........ :-)
>
> >>{ pwd; ls -l ; } > file
> >>--
> >>Barry Margolin
> >>Arlington, MA
>
> > I've made a mistake.
> > The words "give" and "input" must be changed to "get" and "output"
> > so plz read the following
> > "How can I get the output of pwd and ls -l in a file without using
>
> >>>?
>
> That IS what we all assumed you meant. Did you try the solution Barry gave you?
>
> Ed.- Hide quoted text -
>
> - Show quoted text -

Hello,
Yes, I've tried the solution and it's working.
Here is the solution Barry gave me;

{pwd;ls -l;} | some_command
Thank you very much. :-)