Sponsored Content
Top Forums Shell Programming and Scripting NULL Search String & File Name Post 302552924 by pravin27 on Tuesday 6th of September 2011 06:32:33 AM
Old 09-06-2011
Hi,

It should be small "z"
Code:
if [ -z $pat ]

 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

String Search & Replace

Hey, I want to have a C program which, for an existing file supplied by the command line argument (E.g. File1.txt) replaces all the occurrences of the words: "We” or “we” by “I” “a” by “the” “A” by “The”. Then print the replaced file. All other characters of the file are to be left... (1 Reply)
Discussion started by: IwishIknewC
1 Replies

2. Shell Programming and Scripting

how to insert line break + string in vi (search & replace )

Hello all i have big test file that has allot of structure text something like this : <foo1 *.html> <blah action> somthing 1 somthing 2 </blah> </foo1 > now i will like to insert 2 more lines of text below the <blah action> so it will be like : <foo1... (1 Reply)
Discussion started by: umen
1 Replies

3. Shell Programming and Scripting

check for not null string in file

Hi, If, in a text file a string is expected at a certain fixed position(for eg at position 5 or from 5-10 on every line) how to check whether data is present on that position or not? Thnx in advance (6 Replies)
Discussion started by: misenkiser
6 Replies

4. UNIX for Dummies Questions & Answers

vi search & replace ... having '/' in string - problem.

I want to carry out search & replace for the paths mentioned in the file with the help of vi. 'abc/' to be replaced by 'abc/data' When I use command in vi as below - %s/abc//abc/data/g it gives me an error. How we should deal with '/' part in string for vi search & replace? ... (6 Replies)
Discussion started by: videsh77
6 Replies

5. Shell Programming and Scripting

How do I search first&second string & copy all content between them to other file?

Hi All, How do I search first string & second string and copy all content between them from one file to another file? Please help me.. Thanks In Advance. Regards, Pankaj (12 Replies)
Discussion started by: pankajp
12 Replies

6. UNIX for Dummies Questions & Answers

Search for & edit rows & columns in data file and pipe

Dear unix gurus, I have a data file with header information about a subject and also 3 columns of n rows of data on various items he owns. The data file looks something like this: adam peter blah blah blah blah blah blah car 01 30 200 02 31 400 03 57 121 .. .. .. .. .. .. n y... (8 Replies)
Discussion started by: tintin72
8 Replies

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

8. Shell Programming and Scripting

To search null and char in file

Hi guys, I want to know how i can search null value and character value in a feed file. my file has Pipe delimted records. for eg: 1|12|xxx|yyy . . . N records I know the the which column null and char occurs does it has for eg 3rd column which i can obtain by awk $3 and (7 Replies)
Discussion started by: rohit_shinez
7 Replies

9. Shell Programming and Scripting

Search string within a file and list common words from the line having the search string

Hi, Need your help for this scripting issue I have. I am not really good at this, so seeking your help. I have a file looking similar to this: Hello, i am human and name=ABCD. How are you? Hello, i am human and name=PQRS. I am good. Hello, i am human and name=ABCD. Good bye. Hello, i... (12 Replies)
Discussion started by: royzlife
12 Replies

10. AIX

Size of file /dev/./null 2>&1

Hello Can I just remove/delete flile ? rw-r--r-- 1 root system 2385088512 Jun 30 21:25 /dev/null 2>&1 size of this flile is 2274.75 m and fill up my filesystem: Filesystem MB blocks Used Free %Used Mounted on /dev/hd4 2560.00 2558.59 1.41 100% / (10 Replies)
Discussion started by: primo102
10 Replies
httpd_conf(3erl)					     Erlang Module Definition						  httpd_conf(3erl)

NAME
httpd_conf - Configuration utility functions to be used by the Erlang Web server API programmer. DESCRIPTION
This module provides the Erlang Webserver API programmer with utility functions for adding run-time configuration directives. EXPORTS
check_enum(EnumString,ValidEnumStrings) -> Result Types EnumString = string() ValidEnumStrings = [string()] Result = {ok,atom()} | {error,not_valid} check_enum/2 checks if EnumString is a valid enumeration of ValidEnumStrings in which case it is returned as an atom. clean(String) -> Stripped Types String = Stripped = string() clean/1 removes leading and/or trailing white spaces from String . custom_clean(String,Before,After) -> Stripped Types Before = After = regexp() String = Stripped = string() custom_clean/3 removes leading and/or trailing white spaces and custom characters from String . Before and After are regular expres- sions, as defined in regexp(3erl) , describing the custom characters. is_directory(FilePath) -> Result Types FilePath = string() Result = {ok,Directory} | {error,Reason} Directory = string() Reason = string() | enoent | eaccess | enotdir | FileInfo FileInfo = File info record is_directory/1 checks if FilePath is a directory in which case it is returned. Please read file(3erl) for a description of enoent , eaccess and enotdir . The definition of the file info record can be found by including file.hrl from the kernel application, see file(3erl). is_file(FilePath) -> Result Types FilePath = string() Result = {ok,File} | {error,Reason} File = string() Reason = string() | enoent | eaccess | enotdir | FileInfo FileInfo = File info record is_file/1 checks if FilePath is a regular file in which case it is returned. Read file(3erl) for a description of enoent , eaccess and enotdir . The definition of the file info record can be found by including file.hrl from the kernel application, see file(3erl). make_integer(String) -> Result Types String = string() Result = {ok,integer()} | {error,nomatch} make_integer/1 returns an integer representation of String . SEE ALSO
httpd(3erl) Ericsson AB inets 5.5.2 httpd_conf(3erl)
All times are GMT -4. The time now is 10:31 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy