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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T03:12:51+00:00 2026-05-14T03:12:51+00:00

I have a homework assignment where I need to take input from a file

  • 0

I have a homework assignment where I need to take input from a file and continuously remove the first word in a line and append it to the end of the line until all combinations have been done.

I really don’t know where to begin and would be thankful for any sort of direction.

The part that has me confused is that this is suppose to be performed without the use of arrays. I’m not just fishing for someone to solve the problem for me, I’m just looking for some direction.

SAMPlE INPUT:

Pipes and Filters
Java Swing
Software Requirements Analysis

SAMPLE OUTPUT:

Analysis Software Requirements
Filters Pipes and
Java Swing
Pipes and Filters
Requirements Analysis Software
Software Requirements Analysis
Swing Java
  • 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-14T03:12:51+00:00Added an answer on May 14, 2026 at 3:12 am

    A few tidbits that should help: when you call a function with a string, the string is split into multiple arguments (the positional parameters, named $n, where n are integers starting at 1) on the characters in the variable $IFS (which defaults to spaces, tabs and newlines)

    function first() {
        echo $1
    }
    first one two three
    # outputs: "one"
    

    $* and $@ give you all the positional parameters, in order.

    Second, the special variable $# holds the number of arguments to a function.

    Third, shift discards the first positional parameter and moves up all the others by one.

    function tail() {
        shift
        echo $*
    }
    

    Fourth, you can capture the output of commands and functions using `…` or $(...)

    rest=`tail $*`
    

    Fifth, you can send the output of one command to the input of another using the pipe character (|):

    seq 5 | sort
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I need little help on a homework assignment. I have to create a 10
I have a situation in Python(cough, homework) where I need to multiply EACH ELEMENT
I have a homework assignment to write a multi-threaded sudoku solver, which finds all
I have a homework assignment. I'm not looking for anyone to do the work
I need to use segregated free lists for a homework assignment and I was
I'm working on a homework assignment for CS1, and I almost have it finished
First of all: this is not a homework assignment, it's for a hobby project
i have a input tag which is non editable, but some times i need
I have a homework assignment in SQL for Oracle 10g where I have to
Im almost done with a homework assignment that multiplies polynomials and has to have

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.