Search Results

Search: Posts Made By: bwhitehd
6,324
Posted By bwhitehd
I agree. I do not like the way that the...
I agree. I do not like the way that the "developers" write their shell scripts. I'm going to recommend that they change the way they are doing it and move on. I think they were simply counting on...
6,324
Posted By bwhitehd
You're correct, cron is not the issue...
You're correct, cron is not the issue specifically. It's the fact that the assigned value is one more than it should be.

#!/bin/ksh

echo $0
SCRIPT=${0##*/}
echo $SCRIPT
echo...
6,324
Posted By bwhitehd
The cron was not running at the same time. I was...
The cron was not running at the same time. I was done afterwards. The value expected from cron is 2 because cron spawns the script using Bourne shell (sh) as seen from the output.

infa 3962...
6,324
Posted By bwhitehd
It's the second value echo'd in the script. ...
It's the second value echo'd in the script.

echo $SCRIPT

test.ksh

---------- Post updated at 13:24 ---------- Previous update was at 13:21 ----------

Also, any idea why bash outputs a...
6,324
Posted By bwhitehd
ksh behavior change on RHEL5
I recently patched a RHEL5 host from 5.2 to 5.5. There are some scripts that simply do a ps and grep to check for itself before proceeding. I personally don't like the way the scripts are written...
3,132
Posted By bwhitehd
Will the options.txt file be on local or remote...
Will the options.txt file be on local or remote host?

BTW, why do you want to modify the default permissions on the websphere subdirectories? If you are running websphere as a non-root user,...
4,264
Posted By bwhitehd
Is there a specific reason why you want to obtain...
Is there a specific reason why you want to obtain the home directory from a configuration file, rather than just obtaining it directly from /etc/passwd or getpwent()? It seems like a lot of extra...
3,393
Posted By bwhitehd
I'm not sure that I understand correctly what...
I'm not sure that I understand correctly what you're asking, but I think you are assigning a value that start with $ to a variable and want that value output. You will need to escape the character...
6,337
Posted By bwhitehd
Are you trying to find the files within one...
Are you trying to find the files within one directory that have the string 'tagHeu' or are you wanting to do a recursive search of any files below the directory?

If you want a recursive search and...
48,638
Posted By bwhitehd
Here is another way using an array. I reassigned...
Here is another way using an array. I reassigned the values to meaningful variables, but that's optional.


#!/bin/bash

var=($( echo $1 | sed -e...
6,146
Posted By bwhitehd
One thing I have done over the years is create a...
One thing I have done over the years is create a standard set of libraries that I source near the top of my scripts with something like this:


[ -f ${LIBDIR}/bashlib.sh ] && ....
2,888
Posted By bwhitehd
Is this script going to be run locally on the FTP...
Is this script going to be run locally on the FTP server or remotely using the FTP protocol? This will make a big difference in how this can be done and what commands are available.

- B
11,461
Posted By bwhitehd
The poster hasn't replied whether any of the...
The poster hasn't replied whether any of the replies have solved the problem, but something that was pointed out previously is that the double quotes are not suppose to be removed. Only the commas...
1,358
Posted By bwhitehd
Here is an example: (there are different...
Here is an example:

(there are different 'time' commands [i.e. time, times, timex], so you'll want to setup the output you need. You could also use the date command and calculate the passed...
4,543
Posted By bwhitehd
Have you looked at the log files? (both apache...
Have you looked at the log files? (both apache and system logs)
What OS/distribution is this on?
Was anything modified? (configuration file, package upgrade, ...)

-B
1,358
Posted By bwhitehd
There are a few different ways to do this. ...
There are a few different ways to do this. Without having the tool to test some different options, I can't say which I think would work best. You could try running a wrapper that executes time and...
4,481
Posted By bwhitehd
I did find a few posts about syntax error issues...
I did find a few posts about syntax error issues with bash 3.2.x versions. A little more research is needed though. You didn't by chance edit the file on a Windows system? This would have left...
4,481
Posted By bwhitehd
I tested your code on bash 3.2.38 and it worked...
I tested your code on bash 3.2.38 and it worked fine. It might be that specific version has an issue or compatibility problem.

You could try this:
let vkupno=( $vkupno + $kolku )

A couple of...
11,461
Posted By bwhitehd
Sorry, this wasn't indicated in the original...
Sorry, this wasn't indicated in the original post. The sample output showed all of the quotes gone.

I'll update my script and repost. I also noted in the real sample input that there are spaces...
6,797
Posted By bwhitehd
If I'm understanding correctly you are having...
If I'm understanding correctly you are having problems when the password contains a '\' on the end. (i.e. 'abc123\')

If this is the case, the shell is probably seeing this as a line continuation...
11,461
Posted By bwhitehd
I have a working example using perl. Here is a...
I have a working example using perl. Here is a sample execution.


$ cat input.txt
rohan,rahul,kunal,"sw,ati"
rohan,rahul,"k,un,al",swati
rohan,"rah,ul",kunal,swati
"ro,han",rahul,kunal,swati...
5,750
Posted By bwhitehd
A couple of things to consider. First, the...
A couple of things to consider.

First, the ~/.profile is not the only file sourced during an interactive login. Depending on the shell there are also files located in /etc/ that are sourced. So,...
6,567
Posted By bwhitehd
There are several ways to do this, but this...
There are several ways to do this, but this follows the example you gave. You have to use the file with the fewer lines to grep the file with more. This isn't 100% accurate though. Suppose you...
3,186
Posted By bwhitehd
This same code works fine for Bourne shell also. ...
This same code works fine for Bourne shell also. Can you post your code and output?
3,190
Posted By bwhitehd
The s/// operator is for substitution. You are...
The s/// operator is for substitution. You are telling it to replace '\d+$' with ''. Since you're trying to match the numbers and keep just them, you need to remove everything else and carry the...
Showing results 1 to 25 of 32

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