Search Results

Search: Posts Made By: sunrexstar
30,319
Posted By dinjo_jo
No & does move the job to next line
No & does move the job to next line
30,319
Posted By pravin27
I think you can run your first process in...
I think you can run your first process in background by putting & at the end of the command and then run rm command.
8,756
Posted By Corona688
I think you want var[$i]="$LINE" Also note the...
I think you want var[$i]="$LINE" Also note the lack of spaces around the equal sign.

But without knowing your system and shell it's difficult to be sure. What are they?
6,948
Posted By bartus11
perl -p0e 's/<!-- The custom module to do the...
perl -p0e 's/<!-- The custom module to do the authentication for LDAP.*<\/authentication>\n//s' file.xml
20,643
Posted By yinyuemi
awk '/<falsemodule-option>/{p++}...
awk '/<falsemodule-option>/{p++} /<falsemodule-option>/ && p==1 {$0="<LdapLogin>\n"$0}1'
20,643
Posted By yinyuemi
sed '0,/<falsemodule-option>/ { ...
sed '0,/<falsemodule-option>/ {
/<falsemodule-option>/a\<LdapLogin>
}' file


awk is also a good way to try:

awk '/<falsemodule-option>/{p++} /<falsemodule-option>/ && p==1 {$0=...
4,210
Posted By methyl
@Scrutinizer In both cases the above syntax...
@Scrutinizer In both cases the above syntax will only work with bash.
In unix "Posix" shells there is no "==" operator.
I agree that the "case" solution is the best.
4,210
Posted By Scrutinizer
You need spaces around the square brackets and...
You need spaces around the square brackets and you need weak quotes around the variables. Try this:
if [ "$connect" = n -o "$connect" = N -o "$connect" = no -o "$connect" = No -o "$connect" = NO ];...
4,210
Posted By Scrutinizer
if [ "$connect" = n ] || [ "$connect" = N ] ;...
if [ "$connect" = n ] || [ "$connect" = N ] ; then
...
fi

case $connect in
N|n ) ... ;;
esac
4,210
Posted By vgersh99
if [ "$connect" == 'n' -o "$connect" == 'N'...
if [ "$connect" == 'n' -o "$connect" == 'N' ]
3,262
Posted By cfajohnson
Use elif: if [ "$x" = y ] then : do y...
Use elif:

if [ "$x" = y ]
then
: do y
elif [ "$x" = n ]
then
: do n
elif [ "$x" = q ]
then
: do q
fi
or a case statement:

case $x in
y) : do y
;;
n) : do...
1,593
Posted By yinyuemi
ip=xxx port=yyy sed...
ip=xxx
port=yyy
sed '35,40{s/\(.*:\/\/\)\([0-9].[0-9].[0-9].[0-9]\):\([0-9]\{3\}\)\(.*\)/\1'$ip':'$port'\4/}' xml
3,835
Posted By ilikecows
Have you considered using an rsa key pair and...
Have you considered using an rsa key pair and authorized_keys file?

On the machine you are logging in from, cd to the home directory of the user you will be logging into the server as. Once you...
4,919
Posted By DGPickett
You can write a CGI script that puts out a form...
You can write a CGI script that puts out a form if called without arguments but for a post response it calls your script with the form values and gets some sort of status or report to send back to...
11,366
Posted By DGPickett
You could ssh a tunnel and wget locally, assuming...
You could ssh a tunnel and wget locally, assuming you cannot wget directly. You can even leave the ssh tunnels to all of them up on different adjacent local high ports, and just increment the port.
11,366
Posted By Corona688
There's a space missing: ...root@${a[i]}'wget...
There's a space missing:
...root@${a[i]}'wget http://$ip/admBuilds/vADM_$build/RPMs/InSightUpdate-$rn.upd'
...root@${a[i]} 'wget http://$ip/admBuilds/vADM_$build/RPMs/InSightUpdate-$rn.upd'
11,366
Posted By DGPickett
Maybe you need to setup the environment more,...
Maybe you need to setup the environment more, like thisssh him@there '. ./.profile ; wget whatever'
Showing results 1 to 17 of 17

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