Visit The New, Modern Unix Linux Community

Search Results

Search: Posts Made By: amitranjansahu
19,403
Posted By amitranjansahu
You can use read -s for hiding user input .
You can use read -s for hiding user input .
Forum: Solaris 05-02-2012
8,278
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
3,615
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
3,615
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
41,063
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
17,732
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...
Forum: Solaris 12-21-2011
5,833
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 ....
8,729
Posted By amitranjansahu
vpath=`pwd`
vpath=`pwd`
1,012
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,507
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,507
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...
790
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 }'`...
1,987
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)
6,696
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
3,486
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
3,486
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...
4,153
Posted By amitranjansahu
check this . ...
check this .
https://www.unix.com/shell-programming-scripting/17660-check-null-variable.html
4,153
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...
18,263
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
2,801
Posted By amitranjansahu
echo "Header1 Header2 Header3 Header4" > newfile1...
echo "Header1 Header2 Header3 Header4" > newfile1
cat newfile >>newfile1
cp newfile1 newfile
3,045
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,232
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...
1,642
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,564
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.
3,711
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
Showing results 1 to 25 of 26

 

Featured Tech Videos

All times are GMT -4. The time now is 01:47 AM.
Unix & Linux Forums Content Copyright 1993-2020. All Rights Reserved.
Privacy Policy