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

  • Home
  • SEARCH
  • 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 6227355
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T09:11:57+00:00 2026-05-24T09:11:57+00:00

APPLICATION_LOG_DIR=/home/users/sosst51/test-chinboon/logs/testdata1 PREFIX=mylog for i in `ls ${APPLICATION_LOG_DIR}/${PREFIX}*` Is this a for loop whereby i

  • 0
APPLICATION_LOG_DIR=/home/users/sosst51/test-chinboon/logs/testdata1
PREFIX=mylog

for i in `ls ${APPLICATION_LOG_DIR}/${PREFIX}*`

Is this a for loop whereby i am passing the ls of the directory into i.

  • 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-24T09:11:57+00:00Added an answer on May 24, 2026 at 9:11 am

    In bash, for s in string will take a string and split it on whitespace, and iterate over each of the words. So:

    for s in a b c; do echo $s; done
    

    would print:

    a
    b
    c
    

    By passing it the output of ls, you’re iterating over all of the files in that directory (careful though, it’s going to break if any of the filenames contain spaces). This one in particular is iterating over files that start with “mylog”.

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

Sidebar

Related Questions

I made an application on Android and this application logs the activity into files.
My Apache config: DocumentRoot /var/www <VirtualHost *:80> Alias /T /var/www/Test <Directory /var/www/Test> Options Indexes
I'm working with an application that logs to Windows Application Log regularly (viewable through
I see an application have used Log.info = some info where are these logs
I've been having trouble getting my ASP.NET application to automatically log users into the
I'm trying to download a directory, using FTP in a C# application. I basically
I've been trying to get into the 'C:\Windows\System32\winevt\Logs' folder programmatically using C# so I
Here's my batch file to parse a directory, and zip files of certain type
I'm driven crazy with this: Log.d(STATE, Environment.getExternalStorageState()); File f = new File(Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DCIM), work_data); Log.d(PATH,
This is a standalone java application. I am using the configuration file below and

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.