Sponsored Content
Full Discussion: Error line number
Top Forums Shell Programming and Scripting Error line number Post 302782205 by franzpizzo on Monday 18th of March 2013 11:38:02 AM
Old 03-18-2013
Hi, I add a clarification: if you apply this solution to the error output of a script may be necessary to redirect execute a redirect
Code:
./script.sh 2>&1 | awk -F' |:' '{print $4}'

This User Gave Thanks to franzpizzo For This Post:
 

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

crontab: error on previous line; number out of bounds.

Hi, I am trying to set up a cron job for every Friday at 6:00 p.m. and got an error: "/var/tmp/aaaa29638" 1 line, 73 characters 00 18 00 0 5 /app/test/backup.ksh crontab: error on previous line; number out of bounds. Any ideas? Thanks! (1 Reply)
Discussion started by: oradbus
1 Replies

2. Shell Programming and Scripting

Appending line number to each line and getting total number of lines

Hello, I need help in appending the line number of each line to the file and also to get the total number of lines. Can somebody please help me. I have a file say: abc def ccc ddd ffff The output should be: Instance1=abc Instance2=def Instance3=ccc Instance4=ddd Instance5=ffff ... (2 Replies)
Discussion started by: chiru_h
2 Replies

3. Shell Programming and Scripting

Adding a columnfrom a specifit line number to a specific line number

Hi, I have a huge file & I want to add a specific text in column. But I want to add this text from a specific line number to a specific line number & another text in to another range of line numbers. To be more specific: lets say my file has 1000 lines & 4 Columns. I want to add text "Hello"... (2 Replies)
Discussion started by: Ezy
2 Replies

4. Shell Programming and Scripting

how to get the data from line number 1 to line number 100 of a file

Hi Everybody, I am trying to write a script that will get some perticuler data from a file and redirect to a file. My Question is, I have a Very huge file,In that file I have my required data is started from 25th line and it will ends in 100th line. I know the line numbers, I need to get all... (9 Replies)
Discussion started by: Anji
9 Replies

5. Shell Programming and Scripting

Want to trap script error and return line number of failure

Hey all UNIX nerds- I've built a shell script which runs pretty well- only I want it to have much better error trapping. (Like the kind I could apply to every shell script I write). I'm not a UNIX genius, and could really use a bit of help. The original script goes something like this: 1... (3 Replies)
Discussion started by: stevekerver
3 Replies

6. UNIX for Dummies Questions & Answers

How to read contents of a file from a given line number upto line number again specified by user

Hello Everyone. I am trying to display contains of a file from a specific line to a specific line(let say, from line number 3 to line number 5). For this I got the shell script as shown below: if ; then if ; then tail +$1 $3 | head -n $2 else ... (5 Replies)
Discussion started by: grc
5 Replies

7. Shell Programming and Scripting

Write $line number into textfile and read from line number

Hello everyone, I don't really know anything about scripting, but I have to manage to make this script, out of necessity. #!/bin/bash while read -r line; do #I'm reading from a big wordlist instructions using $line done Is there a way to automatically write the $line number the script... (4 Replies)
Discussion started by: bobylapointe
4 Replies

8. Shell Programming and Scripting

Cut from specific line number to a line number

Hi All, I've a file like this.. Sheet1 a,1 a,2 a,3 a,4 a,5 Sheet2 a,6 a,7 a,8 a,9 a,10 Sheet3 a,11 a,12 a,13 (7 Replies)
Discussion started by: manab86
7 Replies

9. Shell Programming and Scripting

sed command to replace a line at a specific line number with some other line

my requirement is, consider a file output cat output blah sdjfhjkd jsdfhjksdh sdfs 23423 sdfsdf sdf"sdfsdf"sdfsdf"""""dsf hellow there this doesnt look good et cetc etc etcetera i want to replace a line of line number 4 ("this doesnt look good") with some other line ... (3 Replies)
Discussion started by: vivek d r
3 Replies

10. Shell Programming and Scripting

Syntax error from cshrc, but not showing line number

Hi, I have been using ksh till now but was forced to use tcsh from last few days. I am getting a gvimrc error which says "set: Syntax error". What makes this pesky is that it is not showing which line number is the error from. How do I get the line number of the error? Also, I am using the... (11 Replies)
Discussion started by: rishikpillai90
11 Replies
KRB5_RD_ERROR(3)					   BSD Library Functions Manual 					  KRB5_RD_ERROR(3)

NAME
krb5_rd_error, krb5_free_error, krb5_free_error_contents, krb5_error_from_rd_error -- parse, free and read error from KRB-ERROR message LIBRARY
Kerberos 5 Library (libkrb5, -lkrb5) SYNOPSIS
#include <krb5.h> krb5_error_code krb5_rd_error(krb5_context context, const krb5_data *msg, KRB_ERROR *result); void krb5_free_error(krb5_context context, krb5_error *error); void krb5_free_error_contents(krb5_context context, krb5_error *error); krb5_error_code krb5_error_from_rd_error(krb5_context context, const krb5_error *error, const krb5_creds *creds); DESCRIPTION
Usually applications never needs to parse and understand Kerberos error messages since higher level functions will parse and push up the error in the krb5_context. These functions are described for completeness. krb5_rd_error() parses and returns the kerboeros error message, the structure should be freed with krb5_free_error_contents() when the caller is done with the structure. krb5_free_error() frees the content and the memory region holding the structure iself. krb5_free_error_contents() free the content of the KRB-ERROR message. krb5_error_from_rd_error() will parse the error message and set the error buffer in krb5_context to the error string passed back or the matching error code in the KRB-ERROR message. Caller should pick up the message with krb5_get_error_string(3) (don't forget to free the returned string with krb5_free_error_string()). SEE ALSO
krb5(3), krb5_set_error_string(3), krb5_get_error_string(3), krb5.conf(5) HEIMDAL
July 26, 2004 HEIMDAL
All times are GMT -4. The time now is 08:46 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy