10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi,
I have a requirement where in i need to write a shell script to set users password to never expire. I know the command which is used to perform the same .. which is chage command.
But, could not figure out how to do the same in shell script.
Could you please help me with the shell... (3 Replies)
Discussion started by: suren424
3 Replies
2. Shell Programming and Scripting
I need to check whether the directory is exist or not. only three letter will be passed as argument. from that it should pick the entire directory.
Instead of banking and manfucuture the input will be passed as man or ban.
$1 -> ban $2-> monday
#!/bin/sh
DIR='/sales/$1*/monday'
if ;... (3 Replies)
Discussion started by: arun888
3 Replies
3. Shell Programming and Scripting
Dear Sir,
I need to remove the word /klp/ in all the files present in the directories
can you tell me how to remove the word globally.
grep "/klp/" * -exec ls -l
Once the above command is exectubed I could see lot of files displayed. (8 Replies)
Discussion started by: ramkumar15
8 Replies
4. Shell Programming and Scripting
I have the following script
=========
#!/bin/sh
MUTEXPREFIX="/tmp/"
READMUTEX=(test globallock)
# If mutexes found - exit out
for m in "${READMUTEX}"; do
|| (echo "$0 Mutex file found - Exiting\n" ; exit 1)
done;
echo "After for loop\n";
exit;=============
What i want... (8 Replies)
Discussion started by: GosarJunk
8 Replies
5. Solaris
Hi Experts,
I am able to run the below command via command line without any issues:
cat test.txt | grep -A 2 "Title"
However, when I put this same command on test.sh and do a ./test.sh, I get the error "grep: illegal option -- A
Usage: grep -hblcnsviw pattern file . . ."
Would... (3 Replies)
Discussion started by: marcusbrutus
3 Replies
6. Shell Programming and Scripting
All,
problem Description: For example: I have two shell scripts(executables). let name it as script1 and script2.I'm trying to execute script1 from script2. while executing script2, script1 is asking for manual input(input from keyboard).
Now i need to know how I can skip this user input... (3 Replies)
Discussion started by: techie99
3 Replies
7. AIX
Ho do I find out the verion of the Kron shell on my client`s system ?
There is no one to ask. They are not knowledged enough (hard to believe but yes).
Also, on that AIX 4.2, I am trying to figure out how to do a grep using a search patter like below but does not seam to work. The '*' do... (11 Replies)
Discussion started by: Browser_ice
11 Replies
8. Shell Programming and Scripting
Hi,
I am new to UNIX Shell scripting, and will require some help.
I am trying to search a directory with a number of files for a specific word, then if that word is found in any of the files, then the filename is appended to a log file or result file by ">" command.
I have been trying to... (2 Replies)
Discussion started by: Sypherg
2 Replies
9. Shell Programming and Scripting
BACKGROUND:
I am using Solaris 10. Some of my boxes have gnu grep and I can use -A and -B flags on those. However, the solaris flavor of grep won't use the flags -A or -B. And some of my boxes won't be getting gnu grep.
Should I try using perl, awk, or sed?
Actual PROBLEM: I am... (7 Replies)
Discussion started by: el_guero
7 Replies
10. Shell Programming and Scripting
Hi everybody,
Do you know how to hide the text for interactive unix shell script? Just like the case for inputting password during logon.
Patrick (1 Reply)
Discussion started by: patrickpang
1 Replies