waspsoft.com


Home > Syntax Error > Bash Bc Standard_in 1 Syntax Error

Bash Bc Standard_in 1 Syntax Error

Contents

Problem with using pause and onslide in one frame A simple visual puzzle to die for Symbolic comparison of recursive functions Good way to explain fundamental theorem of arithmetic? Should have been: Code: [email protected]:~$ bal=347.87; amt=-742; echo "$bal-$amt" | bc (standard_in) 1: syntax error [email protected]:~$ bal=347.87; amt=-742; echo "$bal- $amt" | bc 1089.87 Last edited by catkin; 05-15-2011 at 07:19 Rosa Parks is a [symbol?] for the civil rights movement? UNIX is a registered trademark of The Open Group. this contact form

That will create a randno4='([0]="25649" [1]="%" [2]="100001")' array. porphyry5 View Public Profile View LQ Blog View Review Entries View HCL Entries Find More Posts by porphyry5 05-15-2011, 07:49 AM #6 catkin LQ 5k Club Registered: Dec 2008 Does one of your CSV files have spaces or odd characters in its name? What is the sh -c command?

Bash Syntax Error Near Unexpected Token Done'

The word "temp" is usually short for "temporary" so "ctemp" might be a better choice. share|improve this answer answered Jun 29 '10 at 22:20 Dennis Williamson 167k42235305 flatroad.res (the only .res file in the directory at this time) contains only "0.0" (minus the quotes) It just doesn't do what you think it does.

start=$(nm -S a.out | grep -w _start) start_addr=${start%% *} # Shorter, more efficient myfun=$(nm -S a.out | grep "$1") read myfun_addr myfun_length rest <<< "$myfun" # Shorter, more efficient echo $myfun_length What are the canonical white spaces? Visit the following links: Site Howto | Site FAQ | Sitemap | Register Now If you have any problems with the registration process or your account login, please contact us. Bash Syntax Error Near Unexpected Token Then' How to extrude a face parallel to another?

If I can't get bc to work, I'll have to check it out. –LandonSchropp Feb 25 '10 at 6:48 another way, is to sanitize your input $1 to be Bash Syntax Error Near Unexpected Token Else' bash shell bc share|improve this question edited Jun 23 '14 at 11:43 asked Jun 23 '14 at 11:36 user2064000 562414 Are you willing to use awk? Join them; it only takes a minute: Sign up bc (standard_in) 1: syntax error up vote 1 down vote favorite I am trying to find the location of myfunc in the American English: are [ə] and [ʌ] different phonemes?

For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. Bash Syntax Error Near Unexpected Token Do' Perhaps you meant randno4='$(($RANDOM % 100001))'? –Etan Reisner Nov 25 '14 at 19:27 1 That first line is fine. share|improve this answer edited Dec 3 '15 at 12:50 answered Dec 3 '15 at 12:45 pmg 69k781138 add a comment| up vote 3 down vote You don't need to use bc. Thanks Tim timmay9162 View Public Profile View LQ Blog View Review Entries View HCL Entries Find More Posts by timmay9162 04-26-2006, 02:32 AM #9 jschiwal LQ Guru Registered:

  1. eg shopt -s extglob input="$1" case "$input" in +([0-9.])) IFS="."; set -- $input if [ $# -ne 2 ];then echo "bad decimal" else NUM=$(echo "scale=25;$1/10" | bc ) echo "$NUM" fi
  2. The time now is 07:26 PM.
  3. LinuxQuestions.org > Forums > Non-*NIX Forums > Programming (standard_in) 1: parse error User Name Remember Me?
  4. I checked that the variables assigned from the grep command have been assigned correctly.
  5. The ugly 10k[+]sa[z2!>az2!>b]sbzsclbxlc/p is a bunch of junk that tells dc to compute the average of the numbers left on the stack (with a scale of 10) :D. –gniourf_gniourf Jun 23

Bash Syntax Error Near Unexpected Token Else'

Browse other questions tagged grep echo bc or ask your own question. Join them; it only takes a minute: Sign up (standard_in) 1: syntax error in bash script up vote 0 down vote favorite I'm trying to generate some quasi random numbers to Bash Syntax Error Near Unexpected Token Done' done Dark_Helmet View Public Profile View LQ Blog View Review Entries View HCL Entries Find More Posts by Dark_Helmet 04-24-2006, 05:21 PM #8 timmay9162 LQ Newbie Registered: Feb Bash Syntax Error Near Unexpected Token Fi' The error is still there.

more hot questions question feed lang-sh about us tour help blog chat data legal privacy policy work here advertising info mobile contact us feedback Technology Life / Arts Culture / Recreation weblink What does the "Phi" sign stand for in musical notation? porphyry5 View Public Profile View LQ Blog View Review Entries View HCL Entries Find More Posts by porphyry5 Tags bc Thread Tools Show Printable Version Email this Page Search this Least Common Multiple Is the following extension of finite state automata studied? Bash Syntax Error Invalid Arithmetic Operator

porphyry5 View Public Profile View LQ Blog View Review Entries View HCL Entries Find More Posts by porphyry5 05-15-2011, 07:48 AM #5 porphyry5 Member Registered: Jul 2010 Location: oregon Learning by example from the net is convenient, but examples that don't use space separation carry the implication that in that particular situation one shouldn't. 1 members found this post Dennis numbers 2.0 Video displays in Star Wars Can a creature benefit from differently typed speed bonuses all named fast movement? navigate here Activate Hearthstone season chest cards?

Why can a Gnome grapple a Goliath? Bash Syntax Error Near Unexpected Token Newline' Chances are that you expect that file to contain a single numeric value instead of whatever is in there now. Did Donald Trump call Alicia Machado "Miss Piggy" and "Miss Housekeeping"?

One of the fields was uninitialized. –Suryakalpo Sarker Oct 14 '14 at 20:30 To cut down on commands and pipes, awk also has its own grep style search function:

Modern soldiers carry axes instead of combat knives. Visit the following links: Site Howto | Site FAQ | Sitemap | Register Now If you have any problems with the registration process or your account login, please contact us. Not the answer you're looking for? Bash Syntax Error Unexpected End Of File If you need to reset your password, click here.

How does the pilot control the Dassault Rafale? 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 asked 1 year ago viewed 344 times active 1 year ago Linked 2 How I can check for exact amount of space (MB or GB) in Nagios using check_nt command instead his comment is here Last edited by jschiwal; 04-24-2006 at 04:12 PM.

How to make different social classes look quite different? Make it an answer and I'll delete mine. –mikeserv Jun 23 '14 at 12:18 No, yours is great! randno4=($RANDOM % 100001) upper_limit4=$(echo "scale=10; 1*75.3689"|bc) lower_limit4=$(echo "scale=10; 1*75.1689"|bc) range4=$(echo "scale=10; $upper_limit4-$lower_limit4"|bc) t_twall=`echo "scale=10; ${lower_limit4}+${range4}*${randno3}/100001" |bc` echo "$t_twall" Does anyone know why I the below output and not a value between done Also, the name input.file is a poor choice.

dc is less choosy: find . -type f -exec entropy \{\} + | sed 's/.*://;N;N;s/\n[^:]*:/+/g;s/+//;s|$| 3/p|' | dc I think that does what you're trying to do, but I'm not totally Religious supervisor wants to thank god in the acknowledgements A name for a well-informed person who is not believed? Yes, of course I'm an adult! The Woz Monitor more hot questions question feed lang-sh about us tour help blog chat data legal privacy policy work here advertising info mobile contact us feedback Technology Life / Arts