Sponsored Content
Full Discussion: Debug an Awk Script
Top Forums Shell Programming and Scripting Debug an Awk Script Post 302138330 by mboro on Monday 1st of October 2007 06:05:56 AM
Old 10-01-2007
Have added More fields (New layout)

name1,name2,name3,name4,Title,designation,nationality,dob,POB,
Good quality a.k.a ,Low quality a.k.a,national identication,address,listed On,Other information
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

How to debug the awk script

Hi, How can I debug an awk script? I know that set -x can be used to debug a script. But this will not suite for awk scripts. Can anyone help me? Thanks in advance, Chella (2 Replies)
Discussion started by: chella
2 Replies

2. Shell Programming and Scripting

debug this script

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

Please help to debug a small shell script (maybe AWK problem)?

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

Problem with the script, help me debug

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

Help with debug the script

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

Cant debug shell script

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

Debug script already running

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

Debug perl script

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

[Solved] How to debug awk script?

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

Debug script

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
link(2) 							System Calls Manual							   link(2)

Name
       link - link to a file

Syntax
       link(name1, name2)
       char *name1, *name2;

Description
       A hard link to name1 is created; the link has the name name2.  The name1 must exist.

       With  hard links, both name1 and name2 must be in the same file system.	Unless the caller is the superuser, name1 must not be a directory.
       Both the old and the new share equal access and rights to the underlying object.

Return Values
       Upon successful completion, a value of 0 is returned.  Otherwise, a value of -1 is returned, and errno is set to indicate the error.

Diagnostics
       The system call fails and no link is created under the following conditions:

       [ENOTDIR]      A component of either path prefix is not a directory.

       [ENAMETOOLONG] A component of either pathname exceeded 255 characters, or the entire length of either pathname exceeded 1023 characters.

       [ENOENT]       A component of either path prefix does not exist.

       [ENOENT]       The file named by name1 does not exist.

       [ENOENT]       When name1 or name2 point to an empty string and the environment defined is POSIX or SYSTEM_FIVE.

       [EACCES]       A component of either path prefix denies search permission.

       [EACCES]       The requested link requires writing in a directory with a mode that denies write permission.

       [EEXIST]       The link named by name2 does exist.

       [EPERM]	      The file named by name1 is a directory, and the effective user ID is not that of superuser or  the  environment  defined	is
		      POSIX.

       [EXDEV]	      The link named by name2 and the file named by name1 are on different file systems.

       [EROFS]	      The requested link requires writing in a directory on a read-only file system.

       [EFAULT]       One of the pathnames specified is outside the process's allocated address space.

       [ELOOP]	      Too many symbolic links were encountered in translating one of the pathnames.

       [ENOSPC]       The  directory  in which the entry for the new link is being placed cannot be extended because there is no space left on the
		      file system containing the directory.

       [EDQUOT]       The directory in which the entry for the new link is being placed cannot be extended because the user's quota of disk blocks
		      on the file system containing the directory has been exhausted.

       [EIO]	      An I/O error occurred while reading from or writing to the file system to make the directory entry.

       [ESTALE]       The  file  handle  given	in the argument is invalid.  The file referred to by that file handle no longer exists or has been
		      revoked.

       [ETIMEDOUT]    A connect request or remote file operation failed because the connected party did not properly respond  after  a	period	of
		      time that is dependent on the communications protocol.

       [EMLINK]       The number of links to the file named by path1 would exceed {LINK_MAX}.

Environment
       In the POSIX environment, linking to directories is not allowed.

See Also
       symlink(2), unlink(2)

																	   link(2)
All times are GMT -4. The time now is 10:24 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy