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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T23:37:21+00:00 2026-06-11T23:37:21+00:00

I have the following in Bash (In Linux) for dir in Movies/* do (cd

  • 0

I have the following in Bash (In Linux)

for dir in Movies/*
do
  (cd "$dir" && pwd|cut -d \/ -f5|tr -s '\n' ', ' >> ../../movielist &&
  exiftool * -t -s3 -ImageSize -FileType|tr -s '\t' ',' >> ../../movielist )
echo "Movie $movies - $dir ADDED!"
let movies=movies+1
done

But I wish to make it so the “echo” shows the following echo on the next line (Not concatenate with the last echo output but replace it) so to make it look like it is updating. Similar to how a progress bar with percent would show on the same line.

  • 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-11T23:37:23+00:00Added an answer on June 11, 2026 at 11:37 pm

    Well I did not read correctly the man echo page for this.

    echo had 2 options that could do this if I added a 3rd escape character.

    The 2 options are -n and -e.

    -n will not output the trailing newline. So that saves me from going to a new line each time I echo something.

    -e will allow me to interpret backslash escape symbols.

    Guess what escape symbol I want to use for this: \r. Yes, carriage return would send me back to the start and it will visually look like I am updating on the same line.

    So the echo line would look like this:

    echo -ne "Movie $movies - $dir ADDED!"\\r
    

    I had to escape the escape symbol so bash would not kill it. That is why you see 2 \ symbols above.

    As mentioned by William, printf can also do similar (and even more extensive) tasks like this.

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

Sidebar

Related Questions

I have the following bash script: #DIR is something like: /home/foo/foobar/test/ without any whitespace
i have the following shell script- #!/bin/bash echo enter the full path of script;
i have following lines in a bash script under Linux: ... mkdir max15 mkdir
I have written a program in linux bash and following are ways to start/stop
In my .bashrc I have the following code if [`uname` == "Linux"]; then echo
I have the following bash script, we can call it script1.sh : #!/bin/bash exec
I have a following bash script: 1 #!/bin/bash 2 query='query= SELECT * WHERE {
I have the following code which should put programs startable in Bash. if [
I'm a newbie in bash scripts and have the following problem : I'm trying
I have a shell script file (run.sh) that contains the following: #!/bin/bash %JAVA_HOME%/bin/java -jar

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.