how do i prevent $ from being commented out if no value is present? (Bash Script)
Hey guys,
I want to paste a code in a .php file via a bash script. I am on ubuntu 10.04.
The problem is if the values for $ aren't present, then all of them would be removed by the script.
An example of my script (I modified it for this thread to prevent it from being overly complicated)
The values highlighted in red would change depending on my input. However, the final result is that these values indeed change, however every other value with the symbol '$' infront of them, disappears!
Here is an example of the output:
How do i prevent all those $values from disappearing?
i've vi'ed some scripts in the past and when i did, my screen froze. i had to go to another terminal and kill the vi process before i was able to get back my screen.
how can i replicate this behavior on purpose? i want be able to do this also if the file or script was doubled clicked, say... (17 Replies)
Hi Team,
i have a web ui where user will be passing values and the output will be saved to a file say test with the following contents .
These below mentioned values will change according to the user_input
Just gave here one example
Contents of file test is given below
Gateway... (7 Replies)
Hello
i have server cpanel on centos 6
an there is a client used script to hack other accounts
the script is like this
_____
__________
<?php
$auth_pass = "7815696ecbf1c96e6894b779456d330e";
$color = "#df5";
$default_action = 'FilesMan';
$default_use_ajax = true;... (1 Reply)
I have a script which do validation check and perform code migration from one env. to another, this is built for users/developers.
How can I prevent this shell script from copy or read from users, as they can modify it and run it as per their requirement where as this has to be standard script and... (1 Reply)
Hi,
I am working on a sever A.
I want to write a perl script to execute a shell script persent on the server B.
please help me in this.
thanks in advance. (3 Replies)
I'm using a shared server on Hostgator (Linux CentOS). I'm trying to set a cron job using the Control Panel that will check if its already running before starting a new one.
I've tried the following...
* * * * * &&
but I get this error emailed to me...
/bin/sh: line 0:
Any... (5 Replies)
I have one shell script which is being accessed by many jobs at same time.
I want to make the script such that , other job should wait for the script if script is being used by some other job. Is there any way to implement it in script level ?
Gops (1 Reply)
I need to execute a shell script kept in unix machine from windows. User id, password area available.
For eg.
There's a shell script wich moves all the logs kept in my home directory to a directory named LOGS.
Now i need to get this done through windows; either using a batch file, or java... (4 Replies)
Hi everyone,
I am in the process of trying to decide the correct way to solve a particular scripting/email issue I have and would appreciate any advice.
We have a cronjob running every 10 mins to check disk size on the server and if this exceeds a certain percentage then it will email a... (2 Replies)
I am using bash shell; my requirement is to run a long command.
Now I have split this long command into a number of shell variables.
Some of these shell variables contain special character ':'
At the end, when the intended long command is executed as a series of small shell variables the ':'... (7 Replies)