03-13-2010
Hey,
Thanks for replying but I've tried using the back tick and i didn't give a space when assigning variable but instead i'm getting this error
./testVar: line 7: jey: command not found
the changeName=`echo $name | sed "s/on/ey/"` command cannot be read if i used the back tick
please helpp
9 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
If i write this statement in a Korn Shell script
RCODE=$?
what possibly does it eman? (3 Replies)
Discussion started by: ranjita.c
3 Replies
2. Shell Programming and Scripting
Hi,
I want to check if a variable has a value assigned to it or not.
I can do following -
cat $Var > File1
if
then
echo "$Var has value"
else
echo "$Var is null"
fi
But I have to check for 3 Variables and I want to wrap it up in couple of unix statements.
Any... (3 Replies)
Discussion started by: sumeet
3 Replies
3. Shell Programming and Scripting
hi ,
i m getting an error unary operator is missing. pls check why is this so?
i=5
while test $i !=0
do
echo $i
i=`expr $i - 1`
done (3 Replies)
Discussion started by: angel12345
3 Replies
4. Shell Programming and Scripting
I am making of a script that will go through a couple of for loops and create file names based on the values in that loop, however the variable that combines everything is not getting assigned properly:
#! /bin/bash
for imod in K33_j1b_WS9_6
do
for emod in mb2A mb2C mb3A mb3C mb4A... (1 Reply)
Discussion started by: badinsults
1 Replies
5. Shell Programming and Scripting
Hi, my requirement is that my builds should not be built if the current hour is greater 3 but not (between 12 and 15), I'm trying to write a shell script for this but there is always an error
hour=$1
echo "hour:$hour"
if && ! && ]; then
echo "exit"
else
echo "enter"
fi
... (9 Replies)
Discussion started by: kgsrinivas
9 Replies
6. Shell Programming and Scripting
The requirement is, there is a log file which contains a huge data. i need to get a particular field out of it by searching with another field.
ex:
2011-03-28 13:00:07,423 : millis=231 q={ call get_data_account(?,?,?,?,?) }, params=
i need to search for the word "get_data_account" in file... (1 Reply)
Discussion started by: Jassz
1 Replies
7. UNIX for Dummies Questions & Answers
I am trying to check whether a variable has been assigned on the command line or not.
Here is what I did:
#!/usr/bin/bash
if( $variable == '\0')
{
print "variable was not assigned"
exit
}
else
NF = 2 {print $1, ""}
exit
fi
awk -f question1.awk variable = 58 letters.txt.
So... (3 Replies)
Discussion started by: Fred63528
3 Replies
8. Shell Programming and Scripting
Experts,
I'm having problems with the code below.
I'm trying to test $var2 for two different regexs.
I thought it could be done per below, but I'm getting the following error when running.
$ ./test.pl b fed50c0100****
Unescaped left brace in regex is deprecated, passed through in regex; marked... (2 Replies)
Discussion started by: timj123
2 Replies
9. Programming
Having trouble with the logic when looping over this switch case again:
for (j = 0; data != 0; j++){
switch(data){
case 'c':
output = ranit(r_brace_array);
break;
case 'h':
output = ranit(pipe_array);
break;
... (6 Replies)
Discussion started by: Azrael
6 Replies
LEARN ABOUT CENTOS
tickadj
tickadj(8) System Manager's Manual tickadj(8)
NAME
tickadj - set time-related kernel variables
SYNOPSIS
tickadj [ tick ]
tickadj [ -Aqs ] [ -a tickadj ] [ -t tick ]
DESCRIPTION
The tickadj program reads, and optionally modifies, several timekeeping-related variables in older kernels that do not have support for
precision ttimekeeping, including HP-UX, SunOS, Ultrix, SGI and probably others. Those machines provide means to patch the kernel
/dev/kmem. Newer machines with kernel time support, including Solaris, Tru64, FreeBSD and Linux, should NOT use the program, even if it
appears to work, as it will destabilize the kernel time support. Use the ntptime program instead.
The particular variables that can be changed with tickadj include tick, which is the number of microseconds added to the system time for a
clock interrupt, tickadj, which sets the slew rate and resolution used by the adjtime system call, and dosynctodr, which indicates to the
kernels on some machines whether they should internally adjust the system clock to keep it in line with time-of-day clock or not.
On Linux, only the tick variable is supported and the only allowed argument is the tick value.
By default, with no arguments, tickadj reads the variables of interest in the kernel and displays them. At the same time, it determines an
"optimal" value for the value of the tickadj variable if the intent is to run the ntpd Network Time Protocol (NTP) daemon, and prints this
as well. Since the operation of tickadj when reading the kernel mimics the operation of similar parts of the ntpd program fairly closely,
this can be useful when debugging problems with ntpd.
Note that tickadj should be run with some caution when being used for the first time on different types of machines. The operations which
tickadj tries to perform are not guaranteed to work on all Unix machines and may in rare cases cause the kernel to crash.
COMMAND LINE OPTIONS
-a tickadj
Set the kernel variable tickadj to the value tickadjspecified.
-A Set the kernel variable tickadj to an internally computed "optimal" value.
-t tick Set the kernel variable tick to the value tick specified.
-s Set the kernel variable dosynctodr to zero, which disables the hardware time-of-year clock, a prerequisite for running the ntpd
daemon under SunOS 4.x.
-q Normally, tickadj is quite verbose about what it is doing. The -q flag tells it to shut up about everything except errors.
FILES
/vmunix /unix /dev/kmem
BUGS
Fiddling with kernel variables at run time as a part of ordinary operations is a hideous practice which is only necessary to make up for
deficiencies in the implementation of adjtime in many kernels and/or brokenness of the system clock in some vendors' kernels. It would be
much better if the kernels were fixed and the tickadj program went away.
SEE ALSO
ntpd(8)
The official HTML documentation.
This file was automatically generated from HTML source.
tickadj(8)