Search Results

Search: Posts Made By: cbo0485
6,491
Posted By cbo0485
Expect script called in loop from Bash Script
Having issues with an expect script. I've been scripting bash, python, etc... for a couple years now, but just started to try and use Expect. Trying to create a script that takes in some arguments,...
Forum: SuSE 01-30-2012
3,187
Posted By cbo0485
Thanks for that link, already checked there, and...
Thanks for that link, already checked there, and we have to have 2.28+
Forum: SuSE 01-25-2012
3,187
Posted By cbo0485
GraphViz Help
I have a SLES 11(SP1) server that I am trying to install graphviz 2.28 on. Unfortunately that is not a comman combination, so I can't just use an RPM to install it, I have to build it from source. ...
16,434
Posted By cbo0485
Thanks for all the responses, I went the awk...
Thanks for all the responses, I went the awk route before the other ones and the awk one definitely works. Haven't tested the others, but I'll probably use the shell only one, just b/c that's what I...
16,434
Posted By cbo0485
Cut or awk in reverse
I may be making this too hard on myself, but I'm trying to find a way that I can use a cut or awk string to always remove the last two delimited fields of a string.


Say I have
...
1,953
Posted By cbo0485
Not sure about the rest of the stuff, but if your...
Not sure about the rest of the stuff, but if your just trying to grab the file size of the most recent file in a directory:

fsVar=$(ls -lthr | tail -1 | awk '{print $5}')
echo "Body of e-mail...
Forum: Web Development 12-27-2010
4,609
Posted By cbo0485
Got it to work: RewriteCond...
Got it to work:


RewriteCond %{SERVER_NAME}= ^(.*)(foobar-dev\.)
RewriteCond %{REQUEST_URI} !^/some/context/(.*)
RewriteRule ^/(.*) http://foobar-dev.huntington.com/some/context/ [R=301]
Forum: Web Development 12-23-2010
4,609
Posted By cbo0485
Redirect to add context root
I have an apache site that is connecting to a backend jboss server using the mod_jk plugin. This jboss server has multiple coldfusion applications deploy'd to it, and each of those applications has...
3,356
Posted By cbo0485
That seems to work, and in my bash scripting...
That seems to work, and in my bash scripting history I haven't used sed and awk much together, is there a way within awk to run sed against each result, or do I need to do it within awk?


ps...
3,356
Posted By cbo0485
awk search and print
I have a script where I need to use awk, go through some output, which is stored in a variable, and find a string Xms and Xmx and print the results, including the rest of that string.

Example of...
1,976
Posted By cbo0485
Remote call not hiding password fields
Not sure on the description, but here is a quick rundown.

I have 2 servers, we'll call them

serverA
serverB

On serverB, I am calling a script that inside it has the following:

ssh...
1,117
Posted By cbo0485
If value in varA is not in varB then do something
Basically what I need to do, is read the value of varA, and if it's in varB, then do something, if not, do something else.
varA will contain a single string like:


proj_choice="Test"
...
8,591
Posted By cbo0485
cat test | egrep "string1 string2 string3" ...
cat test | egrep "string1 string2 string3"
string1 string2 string3

cat test
string1 string2 string3

That works, I think you need to provide more information.
16,888
Posted By cbo0485
Worked. Thank you.
Worked. Thank you.
16,888
Posted By cbo0485
Cut display multiple lines of output
I have a script that runs a command, and the output is on multiple lines. The fields are delimited by '='. I need the 8th column from the first line and the 2nd from the second line, but I can't...
9,130
Posted By cbo0485
Loop with sed command to replace line with sed command in it
Okay, title is kind of confusion, but basically, I have a lot of scripts on a server that I need to replace a ps command, however, the new ps command I'm trying to replace the current one with pipes...
1,895
Posted By cbo0485
I'm not very familiar with the c shell, but this...
I'm not very familiar with the c shell, but this seemed to work:

#!/bin/csh

set var=`grep "variable ok" scan.info | cut -d' ' -f 1`
echo $var
19,322
Posted By cbo0485
me@hostname:~/tmp> ./tmp2.sh test1 test2 ...
me@hostname:~/tmp> ./tmp2.sh test1 test2
./tmp2.sh
test1
test2
me@hostname:~/tmp> cat tmp2.sh
#!/bin/sh
echo $0
echo $1
echo $2

me@hostname:~/tmp>


The script name will be $0, and each...
1,895
Posted By cbo0485
Doing yours I got a 0 as the variable using the...
Doing yours I got a 0 as the variable using the below file.

Here is how to do it:

me@hostname:~/tmp> cat tmp.sh
#!/bin/sh

var=$(grep "variable ok" scan.info | cut -d' ' -f 1)
echo $var...
9,906
Posted By cbo0485
bash script tail when string found do something
Okay, I have two scripts, the first one does some stuff, and comes to a point where it has this:

Right here it runs a quick script to start something that writes to a log file.

/usr/bin/tail -f...
10,435
Posted By cbo0485
That's a typo when I took out the actual IP's and...
That's a typo when I took out the actual IP's and server names. In the actual code they have the same number of arguments.

---------- Post updated at 08:28 AM ---------- Previous update was at...
10,435
Posted By cbo0485
Call single function multiple times diff set of parameters
Okay, not sure if it can be done, I would think it could be done and I'm just having a hard time with it.

fun_close_wait(){
ipVar="${1} ${2}"
portVar=`cat "${5}" | cut -d' ' -f 1`
for ip in...
4,999
Posted By cbo0485
Final Solution: #!/bin/sh ...
Final Solution:

#!/bin/sh
baseDirVar="/opt/user/"
cd ${baseDirVar}
sizeVar=`find . -name "nohup*.out" -and -size +5120k`
for i in $sizeVar
do
dirVar=`dirname ${i}`
...
4,999
Posted By cbo0485
Anyone got anything on this. I got my script...
Anyone got anything on this. I got my script working exactly the way it should, but I'd like to be able to use a while loop or something else so it doesn't run so long.
7,398
Posted By cbo0485
/home/chris>cat test.out testing a script ...
/home/chris>cat test.out
testing a script
/home/chris>sed -i "s:a:\':g" test.out
/home/chris>cat test.out
testing ' script
Showing results 1 to 25 of 99

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