11-05-2007
awk does not come with a built in debug option.
I have come across but never used awkdb:
AWK Debugger
Usually I just print out various messages or values of fields
to see what is going on.
If you are using gawk, you could recompile the source with
the debugging option turned on to print out the parse stack
information as gawk executes - but this will probably give
you far more information than you can use.
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I would like to extract the following fields from the text file attached. I copied the contents from a pdf file and pasted them into the text file so I can use awk to extract them. The layout is as listed below.
name1,name2,name3,name4,Title,designation,nationality,dob,
national ... (1 Reply)
Discussion started by: mboro
1 Replies
2. Shell Programming and Scripting
echo "input time in hhmmss"
read $st
h=`echo $st | cut -c1-2`
min=`echo $st | cut -c3-4`
s=`echo $st | cut -c5-6`
echo "input time in hhmmss"
read $end
h1=`echo $end | cut -c1-2`
min1=`echo $end | cut -c3-4`
s1=`echo $end | cut -c5-6`
x= `expr $h /* 60 + $min`
y= `expr $h1 /* 60 +... (8 Replies)
Discussion started by: abhishek27
8 Replies
3. Shell Programming and Scripting
Hi Buddies,
The following is shell scripts which was borrowed from linux box for load average check. it runs good.
(this structure is simple, when load average is too high, it will send alert to user)
#!/usr/bin/ksh
# Set threshold for 1, 5 and 15 minture load avarage
# configured for... (4 Replies)
Discussion started by: GreatJerry
4 Replies
4. Shell Programming and Scripting
Hi,
When i run the script ./script.sh sun, this give me no output, it should give me the list of file.
If i run the script without the argument it should send me echo inside usage().
What is the problem?
please help
-Adsi
#!/bin/sh
ROOT_PATH=/net/icebox/vol/local_images/spins... (2 Replies)
Discussion started by: asirohi
2 Replies
5. Shell Programming and Scripting
Hi,
I have this script, searches and sets variables, then searches and sets more variables from multiple files.
I'd need to debug it a bit.
#!/bin/bash
egrep $1 `find | grep MAGT` >/tmp/resRA-$$
thread=`sed -n '/{0x/ {s/^.*{0x\(*\).*/\1/p;q}' /tmp/resRA-$$`
tag=`sed -n '/Tag=/... (5 Replies)
Discussion started by: Vitoriung
5 Replies
6. Shell Programming and Scripting
Hi I am relatively new in shell scripting Below is the code which i developed but for some reason, it keeps giving me error:
/apps/bss/BatchProg/at1/batch/scripts/ksh/TBATLC02.ksh: syntax error at line 41 : `then' unmatched
#!/usr/bin/ksh... (4 Replies)
Discussion started by: scripting_newbe
4 Replies
7. Shell Programming and Scripting
Hello,
is it possible to debug a script that is already running "on-demand"?
Somehow a command like "set -x" but once you've executed the script. And another one to disable debugging?
Thank you (0 Replies)
Discussion started by: asanchez
0 Replies
8. Shell Programming and Scripting
Hi,
I am trying to get squid up and running using a redirector process, and every time I try to load a web page, squid fails miserably.
Can some one with perl and squid knowledge take a look at these codes and tell if something is wrong here.
#!/usr/bin/perl
#
$| = 1;
@endings = qw/... (0 Replies)
Discussion started by: jamie_123
0 Replies
9. Shell Programming and Scripting
how can i view what variables are stored upon the excution of an awk script.
something equivalent to shell eg. sh -vx "script_file"
many thanks in advance! (1 Reply)
Discussion started by: Apollo
1 Replies
10. Ubuntu
How can I debug this script?
I want to know what it is doing or not doing?
#!/bin/bash
#
#
if ; then
# Do the thing you want before suspend here
echo "we are suspending." > /tmp/systemd_suspend_test.txt
elif ; then
# Do the thing you want after resume here
echo "and we are... (21 Replies)
Discussion started by: drew77
21 Replies
LEARN ABOUT DEBIAN
bootcd2disk
BOOTCD2DISK(1) bootcd utils BOOTCD2DISK(1)
NAME
bootcd2disk - copy a system running from bootcd to a disk
SYNOPSIS
bootcd2disk [-i] [-s] [-c <config directory>] [-url <url>]
DESCRIPTION
With bootcd2disk a CD build with bootcdwrite can be copied to one or more Disk Partitions from the running cd-based system. Therefore
bootcd could be used to make rescue disks.
It is also possible to let bootcd2disk automatically find a disk, make partitions on it, copy the cd to the disk and make the disk
bootable. bootcd2disk will be available as soon as your system is running from cd.
OPTIONS
-i With this option the complete bootcd2disk runs in interactive mode and you can run each function manually. This option is useful for
debugging.
-v The option "-v" (verbose) adds messages on running.
-s This option can be used to disable interactive questions and to try to ignore errors.
-c <config directory>
The configuration directory which normally is "/etc/bootcd" can be changed with this.
-url <url>
If bootcd2disk is slow on your system (because of a slow CD/DVD drive or the HP ILO virtual CD interface), you can use an image server
to get the image from. bootcd2disk use the SWAP partition of your upcoming system as temporary space and copy the image from the con-
figured image server to this partition and use it as image. The image server url is configured with this option.
example install from imagesserver:
bootcd2disk -url http://192.168.1.1/cdimage.iso
Another way the increase the performance is the use of the mounted CD/DVD itself for the copy. The option "-url" is the same, the url
starts with "file:///"
example install from CD/DVD drive sdc0:
bootcd2disk -url file:///dev/sdc0
The swap partition of the upcoming system must have enough space to get the whole image!
Currently no other options can be specified on command line. All other configuration has to be done in the config files.
FILES
/etc/bootcd/bootcd2disk.conf
Configuration for bootcd2disk.
SEE ALSO
Documentation in bootcd2disk.conf
bootcd2disk.conf(5), bootcd(1), bootcdflopcp(1), bootcdwrite(1)
AUTHOR
This manual page was written by Bernd Schumacher <bernd.schumacher@hp.com> and Carsten Dinkelmann <Carsten.Dinkelmann@foobar-cpa.de> for
the Debian GNU/Linux system (but may be used by others).
bootcd2disk 2007-04-04 BOOTCD2DISK(1)