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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T11:21:20+00:00 2026-06-15T11:21:20+00:00

I have the following script: #!/bin/bash PATH=… echo ‘Syncing database dumps’ rsync ssh user@XX.XXX.XXX.XX:/test/

  • 0

I have the following script:

#!/bin/bash        
PATH=...
echo 'Syncing database dumps'
rsync ssh user@XX.XXX.XXX.XX:/test/ /test
echo 'Creating symlink'
ln -s test /tmp/test

Only the first command and all echo’s are run. If I comment out the first command, then the symlink command is run:

#!/bin/bash        
PATH=...
echo 'Syncing database dumps'
#rsync ssh user@XX.XXX.XXX.XX:/test/ /test
echo 'Creating symlink'
ln -s /test /tmp/test

The rest do not run. Any ideas why?

Edit, based on recent comment, added the -v option to the symlink command. Now I can see that all the commands do run. But they do not run in the sequential order they are set in. The symlink command will run BEFORE the rsync command has finished. How can I set the order so the symlink command is only run after the rsync command has finished?

  • 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-15T11:21:21+00:00Added an answer on June 15, 2026 at 11:21 am

    Try rsync’s –blocking-io option, i.e.

    rsync ssh --blocking-io user@XX.XXX.XXX.XX:/test/ /test
    

    Alternatively you could use scp if your protocol is ssh anyway

    scp user@XX.XXX.XXX.XX:/test/ /test
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i have the following shell script- #!/bin/bash echo enter the full path of script;
I have a following bash script: 1 #!/bin/bash 2 query='query= SELECT * WHERE {
I have the following bash script, we can call it script1.sh : #!/bin/bash exec
I have a shell script file (run.sh) that contains the following: #!/bin/bash %JAVA_HOME%/bin/java -jar
In tcsh , I have the following script working: #!/bin/tcsh setenv X_ROOT /some/specified/path setenv
I have the following gnuplot script: #!/bin/bash gnuplot << EOF set term postscript portrait
I have the following script for some number crunching #!/bin/bash sudo apt-get update -y
I have the following script sample: #!/bin/bash # Aborts the script on simple command
Say I have the following Bash script stored in the file foo.sh : #!/bin/bash
I have the following script: #!/bin/bash STUB=`pwd | awk -F '/' '{print / $2

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.