LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 11-07-2005, 12:33 PM   #1
Darwish
Member
 
Registered: Jun 2005
Location: Egypt (North Africa)
Distribution: Debian Sarge
Posts: 35

Rep: Reputation: 15
Angry $LINENO can't be modified in bash 3.0, while it can be in bash 2.05b


I've noticed that the $LINENO can't be modified in bash 3.0. I made a
script (bash debugger) which modify LINENO to a specific value before
using it, it worked in bash 2.05b. but in bash 3.0, even if i've
changed it's value, it counts from "one" like nothing happened

Ex:
------------------------------------------
#! /bin/bash
LINENO=-2
echo "Line = $LINENO"
echo "Line = $LINENO"
echo "Line = $LINENO"
echo "Line = $LINENO"
-------------------------------------------

*result in bash 2.05b:
Line = -1
Line = 0
Line = 1
Line = 2

*result in bash 3.0:\
Line = 3
Line = 4
Line = 5
Line = 6

Is this a bug ?!! and how to change LINENO value in bash3.0
Thanks for help
 
Old 11-07-2005, 02:57 PM   #2
Darwish
Member
 
Registered: Jun 2005
Location: Egypt (North Africa)
Distribution: Debian Sarge
Posts: 35

Original Poster
Rep: Reputation: 15
Talking

Well, it's the third time i post a message and i find the reply exactly after sending...
It's not a bug, since bash 3.0 has changed the way it counts the line number
I can't assign a value to LINENO since when u do echo "$LINENO", bash looks to a built in functions not to LINENO itself...
<The answer from the bash bug Usenet group>
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
bash-2.05b$ instead of user@domain after upgrading...also...no more quotes. RoaCh Of DisCor Slackware 3 12-16-2004 11:17 PM
triggering bash script if directory modified cbb Linux - Software 1 10-23-2004 07:52 AM
root turned to bash-2.05b renegadeavenger Linux - Newbie 2 07-24-2004 09:43 PM
why did bash 2.05b install delete /bin/bash & "/bin/sh -> bash"? johnpipe Linux - Software 2 06-06-2004 06:42 PM
Configure Bash 2.05b JCScoobyRS Linux - Software 9 12-15-2003 04:44 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 05:29 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration