Search Results

Search: Posts Made By: denn
11,886
Posted By denn
assuming you put everything into a file, exactly...
assuming you put everything into a file, exactly as you describe.



for i in `cat filename`
do
BASE=`basename $i`
DIR=`dirname $i | xargs basename`
echo $DIR "," $BASE
done
46,386
Posted By denn
you probably can't get much help without posting...
you probably can't get much help without posting your script or at least relevant portions of it... nobody really wants to guess how you're trying to do everthing.

the way you're doing your...
2,353
Posted By denn
put cursor on the line you want to change and...
put cursor on the line you want to change and type



:%s=/home/user1/bin/=/root/bin

## if you want to globally change
:%s=/home/user1/bin/=/root/bin=g
2,545
Posted By denn
#!/usr/bin/bash echo enter variables read...
#!/usr/bin/bash

echo enter variables
read INPUT
WORDS=`echo $INPUT | wc -w`

case $WORDS in
1)
echo one variable found
;;
2)
...
25,937
Posted By denn
sdiff -s File1 File2
sdiff -s File1 File2
17,329
Posted By denn
ls -l /etc/*.txt > /dev/null 2>&1 if [ $?...
ls -l /etc/*.txt > /dev/null 2>&1

if [ $? -eq 0]; then
"Success"
fi


I wouldn't say it runs well, it most likely returns an error.
you need a space between the test and the bracket ]
and...
Forum: AIX 05-13-2010
22,855
Posted By denn
ntpdate can be run before starting the NTP server...
ntpdate can be run before starting the NTP server daemon, if you suspect your system clock might be to far off. This can also be included in a startup script.
4,712
Posted By denn
assuming no other types of charachters then in...
assuming no other types of charachters then in your example


tr -d [:alpha:] < filename
1,730
Posted By denn
awk -F, '{ print $1 "\t" $3 "\t" $4 "\t" $5 }'...
awk -F, '{ print $1 "\t" $3 "\t" $4 "\t" $5 }' inputfilename
1,677
Posted By denn
Using your oringal output of 26 sbswrk3...
Using your oringal output of


26 sbswrk3 4573M 4673M 7.1% 636:23:50 0.6%, 75 sbswrk1 2724M 2800M 4.3% 805:28:00 0.6%, 31 sbswrk2 3624M 3720M 5.7% 997:34:53 0.1%, 75 sbswrk1 2724M 2800M 4.3%...
4,588
Posted By denn
if you are using Linux, below is my generic...
if you are using Linux, below is my generic script for calculating # of days different between 2 given dates. using a -today flag as many calcs have today's date as one of the inputs. It should...
34,815
Posted By denn
IST is: India Standard Time (IST) +5.5 hours so...
IST is: India Standard Time (IST) +5.5 hours
so not that unusual. There's 3 seperate timezone that are 30 mins offsets, and at least one thats 45 min offsets
9,224
Posted By denn
getopt doesn't handle white space, however all is...
getopt doesn't handle white space, however all is not lost.

just change you script and insert a line checking for arguments or lack thereof:


[[ $# -eq "0" ]] && displayHelp

while getopts "...
2,837
Posted By denn
If you are using csh/tcsh for your login shell,...
If you are using csh/tcsh for your login shell, type in:

rehash

and retry running your script.
if that doesn't work, or you're not using csh/tcsh for login shell.
please post the output of...
2,363
Posted By denn
writing scripts in csh/tcsh is pretty much a lost...
writing scripts in csh/tcsh is pretty much a lost art; with exception of functions, which really is what killed scripting for csh, I find it in a lot of respects better then ksh.. there's things I...
9,047
Posted By denn
your last post, looks like you are not following...
your last post, looks like you are not following the examples given. you need to quote your echo commands... variables with spaces always require quoting.


testvariable3='Apr 1'
...
3,148
Posted By denn
also assuming nj.txt is your filename, and...
also assuming nj.txt is your filename, and assuming text within is as shown.


awk -F\( '$6 ~ "server.com" { print $6 }' nj.txt | awk -F= '{ print $2 }' | tr -d \)
7,116
Posted By denn
You could call a cron script every Sunday, and...
You could call a cron script every Sunday, and then use the modulus operator against the julian date to determine if its an odd, or even week, and run you commands depending on that result.

...
5,619
Posted By denn
#!/usr/bin/bash MINUTE=`date '+%M'` ...
#!/usr/bin/bash

MINUTE=`date '+%M'`
HOUR=`date '+%H'`

case $MINUTE in
28 )
case $HOUR in
0[6-9] )
# insert send email...
16,727
Posted By denn
definately agree with that! If cron is not...
definately agree with that!

If cron is not running, you need to look at why, and/or restart it asap.
Why do you think it's not running?

You might want to read this link:...
8,731
Posted By denn
Without knowing the sizes of files involved it's...
Without knowing the sizes of files involved it's not possible to give a precise answer.

this should work if file sizes are not too extreme; what is aproximate file sizes?


# first files need...
Forum: Solaris 06-27-2008
6,088
Posted By denn
With the format you're using for mailx, it will...
With the format you're using for mailx, it will definately hang forever.
this format will "from command line" give you a new line, where you type in a message, and every newline will do the same,...
Forum: Solaris 06-05-2008
6,859
Posted By denn
in file: /etc/default/login uncomment CONSOLE...
in file: /etc/default/login uncomment CONSOLE statement.


# If CONSOLE is set, root can only login on that device.
# Comment this line out to allow remote login by root.
#
#CONSOLE=/dev/console
20,943
Posted By denn
you was originally going to accept y|Y|yes)...
you was originally going to accept
y|Y|yes) for user input, so users being users, you've really no
idea what they'll type, just for kicks or to give you a hard time.
all the possible options they...
3,827
Posted By denn
First thing is that you have a logic problem. ...
First thing is that you have a logic problem.
you're saying "until" $pst,
the you read & set dump, and then don't reset what pst is??
How would that ever work??


#!/usr/bin/ksh

print "...
Showing results 1 to 25 of 106

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