Sponsored Content
Full Discussion: String Validation program
Top Forums Shell Programming and Scripting String Validation program Post 101804 by jim mcnamara on Monday 13th of March 2006 10:42:56 AM
Old 03-13-2006
Do you know about POSIX classes - maybe something using tr -<whatever> [:alnum:]

[A-z] lets some punctutation like ^ "through"

Plus, unless you turn off globbing, the * character will not come through as *, it will come through as a listing of files in the current directory.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

string validation on a column

Hi there I have a file that I recieve that looks like the folowing, As these details are being manually entered by the customer, we sometimes get a few typos on 4th column (the 14 digit number starting with 42....) As you can see the first one has a space as the first character and then a 13 number... (3 Replies)
Discussion started by: hcclnoodles
3 Replies

2. Shell Programming and Scripting

String validation

All I want to validate a String. If it is "Deepak Xavier" then it will a valid string. But if the value "Deepak #&xavier" then it should be invalid. Please give me some commands. Iam using KORN shell. Thanx in advance. Regards Deepak Xavier (3 Replies)
Discussion started by: DeepakXavier
3 Replies

3. AIX

UserID password validation using C program

I am new to AIX. I was wondering if there is a security API on AIX which I can call from my C program to validate the userID and password of a user. My plan is to have my C program prompt the user for UserID and password. I'll then call the AIX security API to determine what authority the user... (1 Reply)
Discussion started by: AIX_user
1 Replies

4. Filesystems, Disks and Memory

shell program to reverse the string

pls help me in getting that program (1 Reply)
Discussion started by: saikiran
1 Replies

5. Programming

How to trim the white space around a string in C program

I am coding a C program to read a plain text file. There are a lot of blank fields or a string with white spaces. I want to know is there such a function called trim() in C to clean the white space around a string? Or some other way can do this efficiently? Thanks. (18 Replies)
Discussion started by: hxm1303
18 Replies

6. UNIX for Dummies Questions & Answers

Unix shell program that reverse a string...

Thanks so much vivekraj (0 Replies)
Discussion started by: andrew1400
0 Replies

7. Shell Programming and Scripting

extract string and sending it into a new file in perl program

Hi, I have a input file with following values (test.out) I would like to grep all lines with word 'PANIC' and sent it another file using perl program with grep command. I have been trying different ways and not working. Pls advice. Thanks a lot for the help. --example--... (3 Replies)
Discussion started by: hudson03051nh
3 Replies

8. Programming

segfault in pointer to string program

hello all, my question is not about How code can be rewritten, i just wanna know even though i am not using read only memory of C (i have declared str) why this function gives me segfault :wall:and the other code executes comfortably though both code uses same pointer arithmetic. ... (4 Replies)
Discussion started by: zius_oram
4 Replies

9. Shell Programming and Scripting

String validation in shell script

Hi All, I am a newbie...I would like to have a function which ll check if a file contains valid strings before "=" operator. Just to give you my requirement: assume my file has content: hello= gsdgsd sfdsg sgdsg sgdgdg world= gggg hhhh iiiii xxxx= pppp ppppp pppp my... (1 Reply)
Discussion started by: rtagarra
1 Replies

10. Programming

C program to read a binary file and search for a string?

Hi, I am not a C programmer. The only C exposure I have is reading and completing the exercises from the C (ANSI C ) Programming Language book:o At the moment, I am using the UNIX strings command to extract information for a binary file and grepping for a particular string and the value... (3 Replies)
Discussion started by: newbie_01
3 Replies
PIDOF(8)						Linux System Administrator's Manual						  PIDOF(8)

NAME
pidof -- find the process ID of a running program. SYNOPSIS
pidof [-s] [-x] [-o omitpid] [-o omitpid..] program [program..] DESCRIPTION
Pidof finds the process id's (pids) of the named programs. It prints those id's on the standard output. This program is on some systems used in run-level change scripts, especially when the system has a System-V like rc structure. In that case these scripts are located in /etc/rc?.d, where ? is the runlevel. If the system has a start-stop-daemon (8) program that should be used instead. OPTIONS
-s Single shot - this instructs the program to only return one pid. -x Scripts too - this causes the program to also return process id's of shells running the named scripts. -o Tells pidof to omit processes with that process id. The special pid %PPID can be used to name the parent process of the pidof pro- gram, in other words the calling shell or shell script. NOTES
pidof is simply a (symbolic) link to the killall5 program, which should also be located in /sbin. When pidof is invoked with a full pathname to the program it should find the pid of, it is reasonably safe. Otherwise it is possible that it returns pids of running programs that happen to have the same name as the program you're after but are actually other programs. SEE ALSO
shutdown(8), init(8), halt(8), reboot(8) AUTHOR
Miquel van Smoorenburg, miquels@cistron.nl 01 Sep 1998 PIDOF(8)
All times are GMT -4. The time now is 03:32 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy