[ale] bash commands

Matthew simontek at gmail.com
Sun May 20 02:01:45 EDT 2012


> Will insert, or create file, but will wipe data in said file. >> Will append, much safer. < Pulls data from a file.

On 5/20/12, Wolf Halton <wolf.halton at gmail.com> wrote:
> On Sun, May 20, 2012 at 1:01 AM, arxaaron <arxaaron at gmail.com> wrote:
>
>> On 2012/05/19, at 11:21 , Damon L. Chesser wrote:
>>
>> > On Sat, 2012-05-19 at 10:54 -0400, arxaaron wrote:
>> >> On 2012/05/18, at 17:55 , Drifter wrote:
>> >>
>> >>> Thanks.  That did it.
>> >>>
>> >>> sean
>> >>>
>> >>
>> >>
>> >> Pipes ["|"] are for moving output across processes.
>> >>
>> >> I suspect that bash was trying to run your empty text file
>> >> as a process.  "Permission Denied" was an appropriate
>> >> error message.
>> >>
>> >> Redirects [">" | ">>"] are for writing output streams to files.
>> >> The first version appends to the file (and creates it if it doesn't
>> >> exist),  the second "double" form overwrites the file (or creates
>> >> it if it doesn't exist)
>> >
>> > Aaron,
>> >
>> > I think you got it backwards:
>> >
>> > damon at dam-main:~/Desktop$ touch testredirect.xt
>> > damon at dam-main:~/Desktop$ echo 1 > testredirect.xt
>> > damon at dam-main:~/Desktop$ echo 2 > testredirect.xt
>> > damon at dam-main:~/Desktop$ cat testredirect.xt
>> > 2
>> > damon at dam-main:~/Desktop$ echo 1 >> testredirect.xt
>> > damon at dam-main:~/Desktop$ cat testredirect.xt
>> > 2
>> > 1
>> >
>>
>> DOH!!  Thank you.  I did state that backward. Yours is correct:
>> ">>" is the append to file redirect.
>>
>> peace
>> aaron
>>
>>
>>
>>
>>
>>
>> >
>> >>
>> >> HTH
>> >> peace
>> >> aaron
>> >>
>> >>>
>> ------------------------------------------------------------------------------------
>> >>>
>> >>> On Friday, May 18, 2012 05:37:43 pm Robert L. Harris wrote:
>> >>>> try ">" instead of "|"
>> >>>>
>> >>>> On Fri, May 18, 2012 at 3:27 PM, Drifter <drifter at oppositelock.org>
>> >>> wrote:
>> >>>>> I keep reminding myself that I don't begin to know what I think I
>> >>>>> know! :(
>> >>>>>
>> >>>>> I am about to upgrade this box, finally from FC 13 to FC 14.
>> >>>>> Ought to be simple enough.  I have the CD, which I think will do a
>> >>>>> clean install onto a software RAID.
>> >>>>>
>> >>>>> Prior to that I really ought to have on hand a list of all the
>> >>>>> installed packages.
>> >>>>>
>> >>>>> So I created a file <app_list.txt> on the Desktop and then tried
>> >>>>> this:
>> >>>>>
>> >>>>> yum list installed | ~/Desktop/app_list.txt
>> >>>>> and got back this
>> >>>>>
>> >>>>> bash: /home/kilpatms/Desktop/app_list.txt: Permission denied
>> >>>>>
>> >>>>> WTF!
>> >>>>>
>> >>>>> So I checked the perms on the existing (empty) file and they were
>> >>>>> correct. Then I tried the same thing as root, expanding the ~/ and
>> >>>>> got the same response.
>> >>>>>
>> >>>>> So, How DO I make yum throw a list of the installed packages to a
>> >>>>> text file rather than to the terminal?
>> >>>>>
>> >>>>> Sean
>> >>>>>
>> >>>>>
>> >>>>> _______________________________________________
>> >>>>> Ale mailing list
>> >>>>> Ale at ale.org
>> >>>>> http://mail.ale.org/mailman/listinfo/ale
>> >>>>> See JOBS, ANNOUNCE and SCHOOLS lists at
>> >>>>> http://mail.ale.org/mailman/listinfo
>> >>> _______________________________________________
>> >>> Ale mailing list
>> >>> Ale at ale.org
>> >>> http://mail.ale.org/mailman/listinfo/ale
>> >>> See JOBS, ANNOUNCE and SCHOOLS lists at
>> >>> http://mail.ale.org/mailman/listinfo
>> >>
>> >> _______________________________________________
>> >> Ale mailing list
>> >> Ale at ale.org
>> >> http://mail.ale.org/mailman/listinfo/ale
>> >> See JOBS, ANNOUNCE and SCHOOLS lists at
>> >> http://mail.ale.org/mailman/listinfo
>> >
>> > --
>> > Damon
>> > damon at damtek.com
>> >
>> > _______________________________________________
>> > Ale mailing list
>> > Ale at ale.org
>> > http://mail.ale.org/mailman/listinfo/ale
>> > See JOBS, ANNOUNCE and SCHOOLS lists at
>> > http://mail.ale.org/mailman/listinfo
>>
>> _______________________________________________
>> Ale mailing list
>> Ale at ale.org
>> http://mail.ale.org/mailman/listinfo/ale
>> See JOBS, ANNOUNCE and SCHOOLS lists at
>> http://mail.ale.org/mailman/listinfo
>>
>
> You can use a reverse < to pull data from a file as well, and I cannot
> think of any other file-related operators.
> sort < myfile -r > my-reverse-order-file
>
> --
> This Apt Has Super Cow Powers - http://sourcefreedom.com
> Open-Source Software in Libraries - http://FOSS4Lib.org
> Advancing Libraries Together - http://LYRASIS.org
> Apache Open Office Developer wolfhalton at apache.org
>

-- 
Sent from my mobile device

SimonTek
912-398-6704


More information about the Ale mailing list