Description:
Using and programming the Unix shell.
|
|
|
Question: cron to pkill non-responsive VPN connection
|
| |
I have one bash script under RHEL 5.3 to reconnect the VPN whenever
it's broken i.e.
...if ! ps -C 'vpnclient' --no-heading >/dev/null 2>&1
then
echo "relink at $(date +%F\ %T)"
nohup /path/to/vpnclient connect ******* >/dev/null &
fi
...
sometimes the ps command displays vpnclient OK but the connection is... more »
|
|
split file contents into files
|
| |
I have extracted some scripts from an Oracle database using the Toad query below. The script body is of datatype HUGHCLOB;
which means each script may be from 50 - 200+ lines. N.B. Toad is a tool to query oracle database.
select
script_name
, script_type
, '>>>>>'
, script_body... more »
|
|
2D Array Creation Question
|
| |
Is there a better way to create this array?
I know I can do it like this
...name=('workflow','applicati on','process','adaptor','event ','io')
sufix=('war','jar','jar','jar' ,'jar','jar')
fullname('','','','','','','')
sudo update of array with additional information
for (a=0;a<$name[@];a++)... more »
|
|
Help with awk/sed string replacement.
|
| |
What i am trying to accomplish is to build a bash file to run I have a file that contains a coma delimited fields (package name, build number, uarch) Example below
package1, 1.1.0.24-0, noarch
package2, 1.0.0.8-1, noarch
etc...
I am trying to read the file and generate a bash script based upon is contents... more »
|
|
insert text to beginning of each word
|
| |
I am trying to insert 2 characters followed by a space specifially "-D
" to the beginning of each word in a string and also to include the
first word in the string.
e..g have the strings separated by spaces:
"rpool/root rpool/var rpool/test"
I want to pipe this through sed to produce:... more »
|
|
piping and redirection
|
| |
Hi,
I wrote a ruby program that prints out more than a screen's worth of
data to stdout, so I got into the habit of routinely invoking it as:
progname | more
Since I was doing this all the time, I thought it would be an
improvement to incorporate the paging into a script, so I re-wrote the... more »
|
|
script to format line
|
| |
I have a file that doesn't have a field delimiter between the columns and I want to add a colon between each column. I can identify the columns by hard coding the range:
such as "col1 to col 10" "col11 to col24" etc...
I am stuck.
|
|
Pipelines and I/O Redirection
|
| |
Dear All,
I am trying to understand the example used by tdlp.org for I/O Redirection in Unix. The example reads as follows (on the next line you can find my understanding of what is happening - could you please let me know if I am on the right track?):
exec 3>&1 In my understanding this sends any output to file descriptor 3 to file descriptor 1 (standard output).... more »
|
|
|