Sponsored Content
Top Forums Shell Programming and Scripting check for not null string in file Post 302093755 by misenkiser on Monday 23rd of October 2006 08:32:02 AM
Old 10-23-2006
In all the responses it has been assumed that the position 5-10 will be the last portion in the file
however the line length may be upto 80 chars
whereas the search should be only for 5-10 position
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

check for NULL variable

Hello I want to check for NULL variable.. but this is not working..please help thanks in advance esham (2 Replies)
Discussion started by: esham
2 Replies

2. Shell Programming and Scripting

How to check for null or empty string

Hi, I need to check for value not equal (<>) to 21 and not equal empty or null values. Please modify this script if then echo "$VALUE,$BSC_NAME,$BSC_ID" > $OUT_FILE/power_up.out end if TQ (5 Replies)
Discussion started by: doer
5 Replies

3. 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

4. Shell Programming and Scripting

How to check for null value from makefile

My makefile has some code as follows: if ; then \ echo copying tools; \ cp -f `../${TOOLS_ROOT_PATH}/ext_tools.sh 1` ${EXTERNAL_BIN_DIR} || exit $$?;\ fi; \ The ext_tools.sh is as follows: cat ttx.conf | grep external | grep -v ^# | awk '{print $1}' It can sometime result... (1 Reply)
Discussion started by: jake_ryan
1 Replies

5. Shell Programming and Scripting

Insert string 'NULL' where there is a null value

I have an input file having 7 fields delimited by , eg : 1,ABC,hg,1,2,34,3 2,hj,YU,2,3,4, 3,JU,kl,4,5,7, 4,JK,KJ,3,56,4,5 The seventh field here in some lines is empty, whereas the other lines there is a value. How do I insert string NULL at this location (7th loc) for these lines where... (8 Replies)
Discussion started by: zilch
8 Replies

6. Shell Programming and Scripting

check for null

hi, i have 3 lines of output , if second line exists then only condition within the if loop has to exeute other wise it has exit from loop. i had tried like this but not getting please help me ... Code: if ; then echo "success" else echo "" Use code tags please,... (8 Replies)
Discussion started by: sreelu
8 Replies

7. Shell Programming and Scripting

Check for null

Hi Champs!!! im a newbie in unix, need ur expert help for my problem... I need to search if there are any "NULL" entries in the string String without Null Str1: 203652|1000003653|tellt|RUPV|4649|1|07/28/2011 01:56:12 String with Null (RUPV is removed) Str2:... (5 Replies)
Discussion started by: guruprasad7
5 Replies

8. Shell Programming and Scripting

NULL Search String & File Name

Hi All, I am writting a Sell Script, that takes Search String & File Name from the terminal and check for Null Status. If either is NULL then pgm should quit. I wrote the following: bash-3.2$ cat null_status_of_parameters.sh #!/bin/sh #WASS that takes Search String & File Name from... (2 Replies)
Discussion started by: manishdivs
2 Replies

9. Shell Programming and Scripting

Check file for string existence before appending it with string

I want to append file with a string but before doing that i want to check if this string already exist in that file.I tried with grep on Solaris 10 but unsuccessful.Man pages from grep seems to suggest if the string is found command status will be 0 and if not 1.But i am not finding it.May be i... (2 Replies)
Discussion started by: sahil_shine
2 Replies

10. UNIX for Dummies Questions & Answers

Check for not null column in a pipe delimited file

Hi, I have a requirement where I have to check whether the mandatory columns in a pipe delimited file is null and print error message. For eg, I have to check if the 3rd,5th,6th,7th and 8th column are null and print the message "<column name> is null". The data file will have aroung 100,000... (6 Replies)
Discussion started by: reshma15193
6 Replies
ost::ThreadFile(3)					     Library Functions Manual						ost::ThreadFile(3)

NAME
ost::ThreadFile - This class defines a database I/O file service that can be shared by multiple threads. SYNOPSIS
#include <file.h> Inherits ost::RandomFile. Public Member Functions ThreadFile (const char *path) Open or create a new database file. virtual ~ThreadFile () Close and finish a database file. Error restart (void) Restart an existing database; close and re-open. Error fetch (caddr_t address=NULL, ccxx_size_t length=0, off_t position=-1) Fetch a portion of the file into physical memory. Error update (caddr_t address=NULL, ccxx_size_t length=0, off_t position=-1) Update a portion of a file from physical memory. Error append (caddr_t address=NULL, ccxx_size_t length=0) Add new data to the end of the file. off_t getPosition (void) Fetch the current file position marker for this thread. bool operator++ (void) bool operator-- (void) Additional Inherited Members Detailed Description This class defines a database I/O file service that can be shared by multiple threads. All threads access a global copy of the database object, and mutex locks can be used to preserve transaction integrety. pread/pwrite calls can be used for optimized I/O when supported. ThreadFile is meant for use by a threaded database server where multiple threads may each perform semi-independent operations on a given database table stored on disk. A special 'fcb' structure is used to hold file 'state', and pread/pwrite is used whenever possible for optimized I/O. On systems that do not offer pwread/pwrite, a Mutex lock is used to protect concurrent lseek and read/write operations. ThreadFile managed databases are assumed to be used only by the local server and through a single file descriptor. Author: David Sugar dyfet@ostel.com This class defines a database I/O file service that can be shared by multiple threads. Constructor &; Destructor Documentation ost::ThreadFile::ThreadFile (const char *path) Open or create a new database file. You should also use Initial. Parameters: path pathname of database to open. virtual ost::ThreadFile::~ThreadFile () [virtual] Close and finish a database file. Member Function Documentation Error ost::ThreadFile::append (caddr_taddress = NULL, ccxx_size_tlength = 0) Add new data to the end of the file. Parameters: address address to use, or NULL if same as last I/O. length length to use, or 0 if same as last I/O. Error ost::ThreadFile::fetch (caddr_taddress = NULL, ccxx_size_tlength = 0, off_tposition = -1) Fetch a portion of the file into physical memory. This can use state information to fetch the current record multiple times. Returns: errSuccess on success. Parameters: address address to use, or NULL if same as last I/O. length length to use, or 0 if same as last I/O. position file position to use -1 if same as last I/O. off_t ost::ThreadFile::getPosition (void) Fetch the current file position marker for this thread. Returns: file position offset. bool ost::ThreadFile::operator++ (void) bool ost::ThreadFile::operator-- (void) Error ost::ThreadFile::restart (void) [virtual] Restart an existing database; close and re-open. Returns: errSuccess if successful. Reimplemented from ost::RandomFile. Error ost::ThreadFile::update (caddr_taddress = NULL, ccxx_size_tlength = 0, off_tposition = -1) Update a portion of a file from physical memory. This can use state information to commit the last read record. Returns: errSuccess on success. Parameters: address address to use, or NULL if same as last I/O. length length to use, or 0 if same as last I/O. position file position to use or -1 if same as last I/O. Author Generated automatically by Doxygen for GNU CommonC++ from the source code. GNU CommonC++ Sat Jun 23 2012 ost::ThreadFile(3)
All times are GMT -4. The time now is 06:38 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy