waspsoft.com


Home > Syntax Error > Bash While Loop Syntax Error

Bash While Loop Syntax Error

Contents

Subtraction with a negative result Which requires more energy: walking 1 km or cycling 1 km at the same speed? Syntax... Well, it is called !learning the hard way!" Logged Print Pages: [1] Go Up « previous next » PCLinuxOS-Forums » Help » General » bash "while" loop [SOLVED] SMF 2.0.11 What can I do now? this contact form

It just means where the shell becomes aware of the problem, not necessarily where it is. –Fiximan Aug 24 '15 at 8:15 | show 5 more comments 1 Answer 1 active more stack exchange communities company blog Stack Exchange Inbox Reputation and Badges sign up log in tour help Tour Start here for a quick overview of the site Help Center Detailed I'm having some trouble with this loop: get_install(){ while ((!${pkg}-finished)) do if [ "$CURNUM" -lt "$_MAXNUM" ]; then let CURNUM=$CURNUM+1 eval "aria2c -c -j ${_MAXNUM} -x ${_MAXNUM} -s ${_MAXNUM} \ -i The Failing code snippet is as following: [...] while read line do insert_into_table="insert into isam_subrack_tbl (select neId, friendlyName, eqptHolderActualType from $line)" $MYSQL_HOME/bin/mysql --socket=/tmp/mysql.sock -u$MYSQL_USER -p$MYSQL_PWD --host $MYSQL_HOST -Demlplatform -e "$insert_into_table" done

Bash While No Error

While similar questions may be on-topic here, this one was resolved in a manner unlikely to help future readers. How to handle spending money for extended trip to Europe? Subscribed! Is the standard Canon 18-55 lens the same as 5 years ago?

In addition, "while true" can be dangerous, and a "while sleep" is better. #!/bin/bash while sleep 5; do ./pokecli.py echo ">pokecli exited... I understood. Thanks again (but next time maybe be a bit more explicit in your warnings?) LOLOL You wrote the script ... System Information" echo "5. Bash Syntax Error Near Unexpected Token Done' Browse other questions tagged apt bash scripts or ask your own question.

To try running it you may need to install apt-fast from the ppa first, instructions here: https://github.com/ilikenwf/apt-fast After installing, just overwrite /usr/sbin/apt-fast with the one linked above. Registered Users" echo "2. if [ "${counter}" == "true" ] ; then ^ 2) You are not closing the if with "fi" here. Is the following extension of finite state automata studied?

When taking passengers, what should I do to prepare them? Bash Syntax Error Near Unexpected Token Else' Why don't most major game engines use gifs for animated textures? Skipping directly to level 4 How would family relationships change if legal system uses collective punishment? Did Donald Trump call Alicia Machado "Miss Piggy" and "Miss Housekeeping"?

Bash While 1 100

Log In to Answer Copyright © 2016 DigitalOcean™ Inc. Rosa Parks is a [symbol?] for the civil rights movement? Bash While No Error Forum Operations by The UNIX and Linux Forums Android Shell Script Syntax Error Do Last edited by vgersh99; 03-25-2009 at 04:14 PM..

Religious supervisor wants to thank god in the acknowledgements Did Donald Trump call Alicia Machado "Miss Piggy" and "Miss Housekeeping"? weblink At first I didn't remember –DonCallisto May 28 '12 at 8:26 ok thanks DonCallisto –jarhead May 28 '12 at 8:27 add a comment| up vote -2 down vote I Meaning of "soul-sapping" Finding a file starting with '-' dash A name for a well-informed person who is not believed? Can a creature benefit from differently typed speed bonuses all named fast movement? Python While Loop Syntax Error

User Information" echo "2. Reply Log In to Comment 0 dinhhoangviet May 18, 2014 I copied and created new file with the code in example of the link: #!/bin/bash COUNTER=0 while [ $COUNTER -lt 10 Join them; it only takes a minute: Sign up Here's how it works: Anybody can ask a question Anybody can answer The best answers are voted up and rise to the navigate here more stack exchange communities company blog Stack Exchange Inbox Reputation and Badges sign up log in tour help Tour Start here for a quick overview of the site Help Center Detailed

Post the entire script using BB Codes in one block AND then output you're getting. Bash Syntax Error Near Unexpected Token Fi' elif” script0Linux shell scripting error with while loop syntax Hot Network Questions what is the difference between \twocolumn and \documentclass[twocolumn]{book} What is the sh -c command? All Rights Reserved.

Yes, I'm sure.

System Information" echo "5. Is my workplace warning for texting my boss's private phone at night justified? I see that you have run the file through dos2unix but I would still recommend you run it through something similar once more: tr -d '\015' < src.sh > dst.sh share|improve Bash Syntax Error Invalid Arithmetic Operator Does mean=mode imply a symmetric distribution?

Please tell me what I am doing wrong. :-)a) [shimon]$ i=1; while [$i -lt 5] do; echo $i; i=$(($i+1)); donebash: syntax error near unexpected token `done'b) [shimon]$ while true do; echo share|improve this answer answered Jul 27 at 13:55 SaintHax 950112 add a comment| up vote -2 down vote The correct syntax is 7.3 While sample #!/bin/bash COUNTER=0 while [ $COUNTER -lt Force Microsoft Word to NEVER auto-capitalize the name of my company Is there a way to make a metal sword resistant to lava? his comment is here The dos2unix command might help, or run this.

I didn't notice the requirement for spaces around the brackets before.The rule of semicolon after condition (or maybe I should say before "do" and "then") seems to hold for everything: if, Registered Users" echo "2. Religious supervisor wants to thank god in the acknowledgements Why don't most major game engines use gifs for animated textures? Is there more to your script, or does your script have DOS line endings? (It doesn't seem likely, but it's hard to predict sometimes what errors such endings will produce.) –chepner

What does the "Phi" sign stand for in musical notation? I used a while loop to make the script run forever (until Ctrl+C), but the while loop doesn't seem to work. Do you have any idea about why I am getting this error in this while loop? Logged shimonl Sr.