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 8386355
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T17:54:49+00:00 2026-06-09T17:54:49+00:00

I am writing an application which takes text input from the user to generate

  • 0

I am writing an application which takes text input from the user to generate a text file. A bash script, which takes the generated text file as input should generate another script as output.

I tried using exec command but I am not sure if it works. I want something like this:

exec('generate.sh input.txt generated.sh');

generate.sh takes two inputs:

  1. input.txt file – has user input from PHP page(text separated by ‘\n’)
  2. generated.sh – name of the generated file(to be generated by ‘generate.sh’).

How can I execute the bash script from PHP to get the above output?

Thanks in advance.

  • 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-06-09T17:54:51+00:00Added an answer on June 9, 2026 at 5:54 pm

    The whole argument to exec needs to be a string like this:

    exec('generate.sh input.txt generated.sh');
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm writing an application which takes data input from a series of arbitrary RSS
Hello I was just writing a little Android application which takes an image from
I'm writing an aggregation application which scrapes data from a couple of web sources
I am building an application which takes as it's input an executable , executes
I'm writing an application which have to take a picture and send it to
I'm writing an application which will involve interaction with the database. The application will
I'm writing an application which check for my usb device and if the device
i m writing one application which encrypt and decrypt data using AES (ECB) mode.
I'm writing an application which is quite graphically heavy and therefore I'm trying to
I am writing an application which is going to allows users to change the

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.