Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine

Re^2: using the system command

by viktor (Acolyte)
on Jul 01, 2011 at 11:00 UTC ( #912333=note: print w/replies, xml ) Need Help??

in reply to Re: using the system command
in thread using the system command

thanks but i I have to do that same thing 1000 times as the array is catching some of my intended data and it is a long file so i cannot generate hundreds of files .Is that its the fault of the software as I cannot automate it .

Replies are listed 'Best First'.
Re^3: using the system command
by roboticus (Chancellor) on Jul 01, 2011 at 11:46 UTC


    If you're on a unix box, then you can glue files together like this:

    generatefile foo cat foo >>the_big_file generatefile foo cat foo >>the_big_file

    So you can use the same trick in your script. If you're on DOS, there's a similar trick using copy, but you'll have to read the help page on it, as I don't recall it well.


    When your only tool is a hammer, all problems look like your thumb.

Re^3: using the system command
by moritz (Cardinal) on Jul 01, 2011 at 11:11 UTC

    So you neither want to override the files, nor do you want to preserve them. What do you want?

    and it is a long file so i cannot generate hundreds of files

    Uhm, why not? A decent computer can handle hundreds of long files, whatever that means.

    If disc space is an issue, you could compress the files after they are generated. Or extract the information you want from them, and then delete them.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://912333]
[stevieb]: I don't know what you mean. I write the code in C/C++ that accesses the ICs per the datasheet, wrap it for Perl, then use them. My code ensures that the functions/methods from Perl do the right thing for the chips/sensors etc
[stevieb]: At least that's what I'm working on right now. I've also been updating my automated test software Test::BrewBuild so it handles this work properly. It's not really easy meshing high level languages with low-level hardware :)
[stevieb]: this link is probably better for an overview of my test software
[stevieb]: the top-level Raspberry Pi distribution, that sucks in all sub modules. All of this software have imminent updated releases coming

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (3)
As of 2017-06-25 23:15 GMT
Find Nodes?
    Voting Booth?
    How many monitors do you use while coding?

    Results (572 votes). Check out past polls.