|
I have written a very simple bash script to help me migrate from dev to staging. What it does is it deletes all files in staging, copies the files over from dev to stage.
However, the config.inc.php file needs to have the first instance of "dev" to be...
Started by AFG on
, 4 posts
by 4 people.
Answer Snippets (Read the full thread at stackoverflow):
Unlesss.
Quotes around any argument in a shell script containing regular expression material.
|
|
I need to write a bash script that will take a grepable nmap output file that displays IP addresses with port 80 open and copy the IPs that have port 80 open to another text file. The output looks similar to this:
# Nmap 4.76 scan initiated Thu Dec 3 ...
Started by Matt Pascoe on
, 4 posts
by 4 people.
Answer Snippets (Read the full thread at stackoverflow):
Not being familiar with nmap invocation and output format, but still, this should work:
nmap | grep -e 'Ports:.80\/' |sed 's/Host:.... .
Use grep and sed/awk
grep -e '80/open/tcp' infile | awk '{print $2}' | sort -u > outfile
would be my first attempt .
|
|
How do I let user Y write in folder A only when executing script X ?
Started by khelll on
, 4 posts
by 4 people.
Answer Snippets (Read the full thread at superuser):
Then when X is invoked it runs as UA wrapper that just executes some separate ....
How about having script x write to /usr/bin, but as user z which is a user account, and belonging to a user UA that has write privileges to folder A.
|
Ask your Facebook Friends
|
Hi I am using 64bit Fedora 10 linux. I have created a sample java application. Now I want to write init script for that application. so that my application should start on bootup.
How to write init script to start on bootup.
Thanks Sunil Kumar Sahoo
Started by Sunil Kumar Sahoo on
, 5 posts
by 5 people.
Answer Snippets (Read the full thread at stackoverflow):
Many the following init.d script :
#!/bin/bash # # tomcat # # chkconfig: # description: Start up the Tomcat to the /etc/rc.local....
Some of the other answers here will get you started .
Program at will, you'll need to write a script.
|
|
How can I write a linux bash script, that tells me which computers are ON in my LAN ?
It would help if I could give it as input a range of IP's.
Started by Dumb Questioner on
, 12 posts
by 11 people.
Answer Snippets (Read the full thread at stackoverflow):
If you're limiting yourself to only having the last octet changing, this script should do limits the number of pings since the script will end, we can also limit ourself on unique IPs
ping -c 5 finished: 11 IP addresses (2 hosts up) scanned....
|
|
How do I write a Perl Script to read a CSV file first column and Update Oracle table?
cheers
Started by Neel on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
You may want to read about open , readline and split , if you want to write your own CSV parser.
|
|
Does anyone know how to write a bash script that will pull the time off of another server? I need a script that will poll the other server's time and start an event at a very specific period of time based on the time on the external server.
Started by Matt Pascoe on
, 5 posts
by 5 people.
Answer Snippets (Read the full thread at stackoverflow):
You could write a scriptWhy not just sync the time using NTP then use Cron to fire off the script at the appropriate time or even more accurately, then you....
Well this will help you if you don't have strong time constraint .
As appropriate.
|
|
I have created a jar file in java, and I want to make the application automatically start during system boot up. I found I have to write a shell script for that. What should be that shell script look like? Is there anything else I have to do to make an...
Started by Sunil Kumar Sahoo on
, 4 posts
by 4 people.
Answer Snippets (Read the full thread at stackoverflow):
You can also add a program (or the script) to the user's login items through System Preferences a shell script
The preferred way....
In mac os x you can also it.
I don't quite remember.
Don't actually need to write Jar.jar, only Jar.
|
|
Hi,
I'm writing a script which is to be executed hourly. It basically works as:
Read the datafile if it exists. Perform an action if the datafile has certain contents. Write over or create the datafile. I will put the script in /etc/cron.hourly/ on Ubuntu...
Started by Kent on
, 6 posts
by 6 people.
Answer Snippets (Read the full thread at stackoverflow):
I typically create a "data" directory somewhere in the tree where the process has write permissions.
Be placed in any area within the file system that the process can read from and write to.
|
|
Hi I want to write a shell scripting which will return the installed JRE version. How to write shell script file to achieve the above.
If I write java -version then the application returns "1.6.0_14" Java(TM) SE Runtime Environment (build 1.6.0_14-b08...
Started by Sunil Kumar Sahoo on
, 9 posts
by 8 people.
Answer Snippets (Read the full thread at stackoverflow):
Just have your shell script call it with a
java -cp <.
N 1 | cut -d\" -f 2
Alternatively:
Write a Java class that accesses System Property "java.version to standard out rather than standard error.
|