Results 1 to 4 of 4
Hi all,
i am looking for a command/software that will "profile" a script file, i.e. execute it line by line, stopping for "Press any key to continue" type of message ...
- 09-27-2007 #1Just Joined!
- Join Date
- Aug 2007
- Posts
- 24
Command to "profile" a script? (i.e. execute it line by line with "hit space" breaks)
Hi all,
i am looking for a command/software that will "profile" a script file, i.e. execute it line by line, stopping for "Press any key to continue" type of message that awaits user input.
I need this, because i have a large script that basically builds a custom GNU/Linux distribution, but i want to see the results of each step before hitting Space for instance to move on. And no, i would not want to log to a file instead, because if something goes wrong in the middle of my big script, and it simply continue, i will not know what went wrong until after the completion of the script when i look at the log file.
Thanks in advance.
- 09-27-2007 #2
Probably there is many ways to do this but what i use the following .
echo -n "Press Enter to continue"
read
Hope this Help.
Regards.Linux is not only an operating system, it's a philosophy.
Archost.
- 09-27-2007 #3Just Joined!
- Join Date
- Aug 2007
- Posts
- 24
- 09-27-2007 #4Linux Engineer
- Join Date
- Apr 2006
- Location
- Saint Paul, MN, USA / CentOS, Debian, Solaris, SuSE
- Posts
- 1,117
Hi.
I consider a profiler to be different from a debugger.
The book below includes a chapter on a script debugger written as a shell script. It allows breakpoints, single stepping, etc.
Often O'Reilly has the code on-line for downloading ... cheers, drl
Title: Learning the bash Shell
Author: Cameron Newham
Edition: Third
Date: 2005
Publisher: O'Reilly
ISBN: 0596009658
Pages: 376
Categories: bash, scripting, unix, linux, shell, programming
Comments: 4 stars, 27 reviews (Amazon 2007.08 )
Comments: ( I have 2nd edition, 1998 )Welcome - get the most out of the forum by reading forum basics and guidelines: click here.
90% of questions can be answered by using man pages, Quick Search, Advanced Search, Google search, Wikipedia.
We look forward to helping you with the challenge of the other 10%.
( Mn, 2.6.n, AMD-64 3000+, ASUS A8V Deluxe, 1 GB, SATA + IDE, Matrox G400 AGP )


Reply With Quote
