I guess the command id <username> is available on every Unix/Linux.
Using more on a file to pipe it into grep is no good usage. grep takes filenames as parameter directly. Also is more for page wise listing of a file.
Hi All,
I am new to shell scripting.
Can someone let me know, how to check whether the user exists in the remote system?
I am building a new unix box and before I proceed installing the appliation , I want to check whether the required users are created in the system .
how to do this ?... (1 Reply)
Hi all,
I've been trying to find a good check I can put it in to a shell script to see if a given user exists.
Some of the things I've thought about is checking whether they have a home directory, but not all users have a home directory. I've thought about grepping the /etc/passwd file for... (4 Replies)
Hi all,
Is there any system wide limit on number of user threads. I only find nkthread as a tunable parameter,apart from the `per process limit`. (1 Reply)
I will have to process multiple files with same name everyday.
My requirement is:
If on a certain day I see that filename.txt exists then the contents of the filename.txt would be added/append
to the former file contents.Each time it sees the file the content would be added.But the header ... (8 Replies)
Hello!
I'm stuck with a problem that i can't solve. I'm very new to unix, linux and shell scripting i might add. I'm trying to create a script that will execute as follows:
First start the script - sh exist
Then the prompt asks the user to input a username to check if it exists within the... (6 Replies)
Hello all,
Would like to know how to find records between two files which are not exists in one another in one. For example: I've two files "fileA" and "fileB" and want to find record from "fileB" which does not exists in "fileA".
fileA
--------
ABCD
DEFG
GHIJ
KLMN
NOPQ
RSTU
VUWX... (5 Replies)
I need to check if an entry input by the user is in a file. If so, I need to run a command, and if it does not exist then it should output entry does not exist.
So I have so far...
echo "Enter record:"
read record
//command || //command
Can I use an if statement to do this? (3 Replies)
Hi all
I have a list of file names in array. But this file names are not exact. so i want to search whether a file exists or not using regular expression.
code snippet:
if ;
then
echo "File exists"
else
echo "File does not exits"
fi
over here "*EQST*" should be treated as a regular... (4 Replies)
Hi all, Hope everyone doing good.
Let me come to point, i have setup-ed a LDAP server and client machines
Server works perfect, while make a search from client machine it too get the Query from LDAP server, But while i switch user it says user not exists
# su - babin
su: user babin does... (3 Replies)