Sponsored Content
Top Forums Shell Programming and Scripting Null values after emptying a log file Post 56652 by S.P.Prasad on Thursday 7th of October 2004 09:36:12 AM
Old 10-07-2004
Ok I would give a try.

Send a SIGSTOP signal to the process which you want to pause/stop, copy the log files to target directory and finally issue a SIGCONT signal to the same process.

The problem as stated by you is extras null being inserted in the "log" file could be caused of improper write( ) call to the log file. Check the length of the data being written in the file.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

identifying null values in a file

I have a huge file with 20 fileds in each record and each field is seperated by "|". If i want to get all the reocrds that have 18th or for that matter any filed as null how can i do it? Please let me know (3 Replies)
Discussion started by: dsravan
3 Replies

2. Shell Programming and Scripting

How to check Null values in a file column by column if columns are Not NULLs

Hi All, I have a table with 10 columns. Some columns(2nd,4th,5th,7th,8th and 10th) are Not Null columns. I'll get a tab-delimited file and want to check col by col and generate seperate error code for each col eg:102 if 2nd col value is NULL and 104 if 4th col value is NULL so on... I am a... (7 Replies)
Discussion started by: Mandab
7 Replies

3. UNIX for Dummies Questions & Answers

Emptying a file (bring the size of the file down to 0 , or close to 0)

Hi I tried to empty an existing file (bring the size of the file down to 0). When I used “> myFile” or “cat </dev/null >myFile”, when I do a “ls –la”, the file size shows as 0. I then wrote 540 lines to the file, and then opened it using vi, I see something like this: "myFile" 540 lines,... (3 Replies)
Discussion started by: qmqmqm
3 Replies

4. Shell Programming and Scripting

Sed emptying file when i use for search replace operation

Hi Friends I am new to sed programming , i found that the below code can search for the $ToSearch and Replace it with $ToReplace ( $ToSearch and $ToReplace are my variables in my script ) sed "s/$ToSearch/$ToReplace/" $file > $output mv $output $file In testing the script i found that... (3 Replies)
Discussion started by: rakeshkumar
3 Replies

5. Shell Programming and Scripting

Find for line with not null values at nth place in pipe delimited file

Hi, I am trying to find the lines in a pipe delimited file where 11th column has not null values. Any help is appreciated. Need help asap please. thanks in advance. (3 Replies)
Discussion started by: manikms
3 Replies

6. Shell Programming and Scripting

File values alwaya null

Hi All , below is my shell program. !/bin/sh set -x #---------------------------------------------------------------------------------------- # Program : weekly_remove_icd_file.sh # Author : # Date : 04/06/2013 # Purpose : Execute the script to... (3 Replies)
Discussion started by: krupasindhu18
3 Replies

7. Shell Programming and Scripting

Replace a field where values are null in a file.

Hi, I've a pipe delimited file and wanted to replace the 3rd field to 099990 where the values are null. How can I achieve it using awk or sed. 20130516|00000061|02210|111554|03710|2|205069|SM APPL $80-100 RTL|S 20130516|00000061|02210|111554|03710|2|205069|SM APPL $80-100 RTL|S... (12 Replies)
Discussion started by: rudoraj
12 Replies

8. Shell Programming and Scripting

Grep null values in a file with no delimiter

Hi Folks, We have a file that has null values but there are no delimiters. So all columns are considered as a single column. Ex: abc def 123 abcdef1234567 hijklmn7896545 Now from "a" till "3" all are considered as a single column from the first row. Our requirement is like, we... (2 Replies)
Discussion started by: jayadanabalan
2 Replies

9. Shell Programming and Scripting

Fields shifting in file, do to null values?

The below code runs and creates an output file with three sections. The first 2 sections are ok, but the third section doesn't seem to put a . in all the fields that are blank. I don't know if this is what causes the last two fields in the current output to shift to a newline, but I can not seem... (3 Replies)
Discussion started by: cmccabe
3 Replies

10. Shell Programming and Scripting

Count null values in a file using awk

I have the following a.txt file A|1|2|3|4|5| A||2|3|0|| A|1|6||8|10| A|9|2|3|4|1| A|0|9|3|4|5| A||2|3|4|5| A|0|av|.9|4|9| I use the following command to count null values for 2nd field awk -F"|" '!$2 { N++; next } END {print N}' a.txt It should give the result 2, but it is giving... (2 Replies)
Discussion started by: RJG
2 Replies
sigqueue(3)						     Library Functions Manual						       sigqueue(3)

NAME
sigqueue - Queues a signal and data to a running process LIBRARY
Realtime Library (librt.so, librt.a) SYNOPSIS
#include <signal.h> int sigqueue ( pid_t pid, int signo, const union sigval value); PARAMETERS
pid Specifies the ID of the target process. signo Specifies the signal to be queued. If the signo parameter is 0 (the null signal), error checking is performed but no signal is sent. This can be used to check the validity of the pid parameter. value Specifies the application-defined value to be queued to the receiving process. DESCRIPTION
The sigqueue function causes the signal specified by signo to be sent with the value specified by value to the process specified by pid. The conditions required for a process to have permission to queue a signal to another process are the same as for the kill function. If the call is successful, the signal is queued to the specified process. If the process has the SA_SIGINFO flag enabled for the queued signal, the specified value is delivered to its signal handler as the si_value field of the siginfo parameter. Nonprivileged callers are restricted in the number of signals they can have actively queued. This per-process quota value can be returned with sysconf(_SC_SIGQUEUE_MAX). RETURN VALUES
Upon successful completion, the sigqueue function returns a value of 0 (zero). Otherwise, a value of -1 is returned and errno is set to indicate the error. ERRORS
If sigqueue fails, no signal is sent, and errno is set to one of the following values: [EAGAIN] No resources are available to queue the signal. The process has already queued {SIGQUEUE_MAX} signals that are still pending at the receiver(s), or a system-wide resource limit has been exceeded. [EINVAL] The signo parameter is not a valid signal number. [EINVAL] The signo parameter is SIGKILL, SIGSTOP, SIGTSTP, or SIGCONT, and the pid parameter is 1 (process 1 -- init). [ESRCH] No process can be found corresponding to that specified by the pid parameter. [EPERM] The real or saved user ID does not match the real or effective user ID of the receiving process, the calling process does not have appropriate privilege, or the process is not sending a SIGCONT signal to one of its session's processes. RELATED INFORMATION
Headers: siginfo(5) Functions: kill(2), sigaction(2), sysconf(3) Guide to Realtime Programming delim off sigqueue(3)
All times are GMT -4. The time now is 05:47 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy