Latest LQ Deal: Linux Power User Bundle
Go Back > Forums > Linux Forums > Linux - Software
User Name
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.


  Search this Thread
Old 11-07-2005, 01:33 PM   #1
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

#! /bin/bash
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, 03:57 PM   #2
Registered: Jun 2005
Location: Egypt (North Africa)
Distribution: Debian Sarge
Posts: 35

Original Poster
Rep: Reputation: 15

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>


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 more quotes. RoaCh Of DisCor Slackware 3 12-17-2004 12:17 AM
triggering bash script if directory modified cbb Linux - Software 1 10-23-2004 08:52 AM
root turned to bash-2.05b renegadeavenger Linux - Newbie 2 07-24-2004 10:43 PM
why did bash 2.05b install delete /bin/bash & "/bin/sh -> bash"? johnpipe Linux - Software 2 06-06-2004 07:42 PM
Configure Bash 2.05b JCScoobyRS Linux - Software 9 12-15-2003 05:44 PM > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 11:16 PM.

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