Search Results

Search: Posts Made By: amitranjansahu
Forum: Solaris 05-02-2012
12,072
Posted By amitranjansahu
most likely this is due to expiry or locking of...
most likely this is due to expiry or locking of account. Check the bellow link and give a try .

CRON: bad user - Sun Solaris (http://www.justskins.com/forums/cron-bad-user-149310.html)
Forum: Solaris 01-18-2012
4,114
Posted By amitranjansahu
You need to clear your fundamentals in UNIX first...
You need to clear your fundamentals in UNIX first . I will suggent you study the PATH variable (what, why and how to set ) . The path is like where you search your exe or commands. You can check in...
Forum: Solaris 01-18-2012
4,114
Posted By amitranjansahu
you have not set your path . normaly it should be...
you have not set your path . normaly it should be in /usr/sbin dir.

Either u add that to your pathelse u can give the full path to execute


/usr/sbin/ping x.x.x.x
Forum: Solaris 01-09-2012
59,231
Posted By amitranjansahu
Is there any external file system mounted on your...
Is there any external file system mounted on your machine ? If so may be one of the remote files system is taking time to respond.

whats the out put of the df -kh
Forum: Solaris 12-21-2011
6,377
Posted By amitranjansahu
you need to take the logs for the cron job . Most...
you need to take the logs for the cron job . Most likely its a env variable issue as cron does not set your env variables by default. You need to check the cronrun log file to find the details ....
13,072
Posted By amitranjansahu
vpath=`pwd`
vpath=`pwd`
1,300
Posted By amitranjansahu
use -w option for whole word search ...
use -w option for whole word search


grep -w 275 myfile.txt


check man page of grep for more details
1,837
Posted By amitranjansahu
yes you can use it . But you must know the basic...
yes you can use it . But you must know the basic of unix and scripting . Pls search the net and study some startup unix skill
1,837
Posted By amitranjansahu
First create a script to collect the details in a...
First create a script to collect the details in a text file and send the content for file in mail.Then add that script to cron jobs using "crontab -e " command.

An example for cpu details is...
1,127
Posted By amitranjansahu
here is the basic logic . here you can get two...
here is the basic logic . here you can get two variables $a and $b for every line. You can modify it as per your requirement


while read line
do
a=`echo $line |awk -F: '{print $1 }'`...
21,770
Posted By amitranjansahu
I found the solution
Although its not a 100% solution but its working .

Just add your mail server address in /etc/hosts


12.115.40.19 amit.com


then check you are able to connect to the mail sever...
2,213
Posted By amitranjansahu
Refer Unix is a Four Letter Word: Unix...
Refer

Unix is a Four Letter Word: Unix ---&gt Wildcards (http://unix.t-a-y-l-o-r.com/USwild.html)
7,258
Posted By amitranjansahu
print "${L_STRING}" | sed...
print "${L_STRING}" | sed y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/


or

bash-2.05b$ echo "amit" |tr "[:lower:]" "[:upper:]"
AMIT
Forum: Infrastructure Monitoring 06-29-2010
4,480
Posted By amitranjansahu
No you are doing it wrong create a file...
No you are doing it wrong

create a file named sn
inside the file write
snmpget -c DreamTeam dal2-hr1 ifAlias.$1

give execute permission
chmod 755 sn

make sure that the file is created in...
Forum: Infrastructure Monitoring 06-29-2010
4,480
Posted By amitranjansahu
i have another way. create a script and put...
i have another way.

create a script and put it in your path with execute permission

#cat sn
snmpget -c DreamTeam dal2-hr2 ifAlias.$1

so you can simply execute command to execute the snmp...
5,211
Posted By amitranjansahu
check this . ...
check this .
https://www.unix.com/shell-programming-scripting/17660-check-null-variable.html
5,211
Posted By amitranjansahu
if [ `ps -elf | grep batch_output_x | grep -cv...
if [ `ps -elf | grep batch_output_x | grep -cv grep` = 0 ]
then
echo 'Gateway output processing started.'
else
VAR=$(ps -ef | grep batch_output_x )...

fi


You are not...
23,432
Posted By amitranjansahu
Thre is no process running called red5 . You are...
Thre is no process running called red5 . You are getting the PID of grep.

check with
ps -aef | grep red5 | grep -v grep
4,437
Posted By amitranjansahu
echo "Header1 Header2 Header3 Header4" > newfile1...
echo "Header1 Header2 Header3 Header4" > newfile1
cat newfile >>newfile1
cp newfile1 newfile
3,470
Posted By amitranjansahu
for myuser in `cat /etc/passwd | cut -d ':'...
for myuser in `cat /etc/passwd | cut -d ':' -f1`;
do
some work on the user in $myuser
done
1,601
Posted By amitranjansahu
./ means you are specifying the path (location)...
./ means you are specifying the path (location) of script.

it means the shell will execute the script from the current pwd.

Its same if you give complete path like /home/amit/myscript.sh
else...
2,848
Posted By amitranjansahu
read -p "Enter userinput maually ...
read -p "Enter userinput maually : " userinput

echo "\$__MR_CONFIG['system']['database']['database_Primary']['username'] = '$userinput';" > filename
1,930
Posted By amitranjansahu
Put the script in /etc/rc3.d directory and rename...
Put the script in /etc/rc3.d directory and rename it as startup scripts already there in the directort

Say S99_startup.sh .when the machine will boot it will execute the script.
5,134
Posted By amitranjansahu
while read line do echo $line | grep...
while read line
do

echo $line | grep $pattern >/dev/null



if [ $? -eq 0 ]
then
echo $line4

fi

line4=$line3
line3=$line2
line2=$line1
line1=$line
done < $filename
Forum: Solaris 05-07-2010
5,230
Posted By amitranjansahu
awk ' { print $3 } ' filename
awk ' { print $3 } ' filename
Showing results 1 to 25 of 26

 
All times are GMT -4. The time now is 06:18 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy