Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6828595
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T22:24:06+00:00 2026-05-26T22:24:06+00:00

This is my first post here although I’ve come here for solutions very very

  • 0

This is my first post here although I’ve come here for solutions very very frequently!
I couldn’t find an answer to a question I have. Maybe I’m using the wrong tags in my search :/ Anyway, please, pardon me in advance if the question was asked before.

I want to create a small script to automatically upload photos and videos from a folder. I currently use a perl script called “flickr_upload”, found in the macports directory.

Let’s say I have 12 files in a directory. I want to split these 12 files in 3 batches of 4 files and launch 3 command-lines in parallel using xterm for example.

How can automatically split a list by just specifying the number of batches?

Regards

Edit: instead of writing:

flickr_upload photo01.jpg photo02.jpg photo03.jpg

I’d like to have:

flickr_upload photo01.jpg
flickr_upload photo02.jpg
flickr_upload photo03.jpg

by writing something like:

split -n 3 ./*.jpg | xterm flickr_upload -
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T22:24:07+00:00Added an answer on May 26, 2026 at 10:24 pm

    xargs can do this for you.

    for instance, seq 10 | xargs echo echos all 10 “arguments” at once. But seq 10 | xargs -n 3 echo does them 3 at a time:

    1 2 3
    4 5 6
    7 8 9
    10
    

    I don’t know anything about flickr_upload or what “macports” might be, but presumably you can do this:

    ls *jpg | xargs -n 3 flickr_upload

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

First post here, I have tried searching but couldn't find what I'm looking for
This is my first post here. I have a problem. I need to take
this is my first post here on stackoverflow and am very impressed by the
Well, this is my first post here and really enjoying the site. I have
This is my first time here so I hope I post this question at
This is my first post in here and I wouldn't post a question here
I'm a Java beginner and this is my first post. I couldn't find anything
This is my first post here. My question is similar to a previous thread
This is my first post here and I wanted to get some input from
My first post here, so i hope this is the right area. I am

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.