Search Results

Search: Posts Made By: 3junior
1,190
Posted By 3junior
Grabbing value from file and run command in ``
Hi ALL,

How can I make a script take data from a file and execute the commands within `` in the file n put that that in a variable?


for i in `cat file`
do
file=`grep -i key file`
...
Forum: AIX 11-13-2013
1,984
Posted By 3junior
Problems with kerberos and forest domain
Hi,

I have a simple Apache setup that works fine when I create a keytab on a domain level authentication works fine. When I create a keytab at the forest level authentication does not work. I get...
Forum: Linux 09-05-2013
1,447
Posted By 3junior
Rewrite proxypass
Hi,

I have a Apache 2.0 web server. When a users comes in to sitea.com a check is applied if the path ends with *t*, the user hits a rewrite rule that adds an environment variable called x is hit...
3,426
Posted By 3junior
I am just using the folder test an a example. The...
I am just using the folder test an a example. The real test was, I execute a binary file and if the error code is not 0 I use exit 1, but the RPM entry is still in the database.
3,426
Posted By 3junior
How to make RPM not write to RPM database if RPM fails to deploy?
How to make RPM not write to RPM database if RPM fails to deploy?

IE I create an rpm spec file that contains the following

if [ ! -f /test ]
then
exit 1
fi

My rpm will fail at deployment,...
78,438
Posted By 3junior
My question was asking how to set a variable to...
My question was asking how to set a variable to another variable
like
car=honda
export ${car}=blue
echo $honda
blue
78,438
Posted By 3junior
Shell assign variable to another variable
How can I assign a variable to an variable. IE $car=honda

One way I can do it is export $car=honda
or
let $car=2323

Is there any other ways to preform this task
11,259
Posted By 3junior
#!/bin/bash logdir=/jvm[0-9]*/logs ...
#!/bin/bash
logdir=/jvm[0-9]*/logs
logfiles=`find ${logdir} -type f`
todat=`date +"%Y-%m-%d"`

for i in `ls ${logfiles} | grep -v ${today}`
do
gzip ${i}
echo "File ${i} has been gziped"...
Forum: SuSE 10-27-2010
3,552
Posted By 3junior
SLES 9 vs SLES 11 hard drive cache read timings are diffrent
Can anyone give me a little clue on why the hard drive cache read timings on sles 9 is better then sles 11? The same hardware was used in both test. I even deleted the ata_generic module from initrd....
7,176
Posted By 3junior
Can someone please explain what tr#A-Za-z0-9+/# -_#; means in perl?
Can someone please explain what tr#A-Za-z0-9+/# -_#; means in perl?
7,116
Posted By 3junior
use csplit
use csplit
7,618
Posted By 3junior
#!/bin/sh for i in `ls *.txt` do file=`awk...
#!/bin/sh
for i in `ls *.txt`
do
file=`awk -F'.' '{print $1}'`
perl myScript.pl ${file}.txt ${file}.xml
done
1,493
Posted By 3junior
#!/usr/bin/perl use strict; use warnings; ...
#!/usr/bin/perl
use strict;
use warnings;

my ($file, $i, @line);

$file="file.txt";

open(FILE,"<",$file, $file);
foreach $i (<FILE>){
@line=split(/,/,$i);...
1,680
Posted By 3junior
just use my perl script
just use my perl script
2,890
Posted By 3junior
open(FILE,"<","filename") @file=<FILE> ...
open(FILE,"<","filename")
@file=<FILE>
close(FILE)
open(FILE,"<","filename")

pattern here
print FILE "dfksdfjsdkfj\n"
close(FILE)
Forum: Linux 06-29-2010
15,544
Posted By 3junior
match if substring(option...
match if substring(option vendor-class-identifier, 0, 9) = "PXEClient";
Forum: Linux 06-29-2010
15,544
Posted By 3junior
dhcp what does vendor-class-identifier, 0, 9 mean?
dhcp what does vendor-class-identifier, 0, 9 mean?
match if substring(option vendor-class-identifier, 0, 9) = "PXEClient";
2,890
Posted By 3junior
perl edit file
Is there a way to edit a file without opening two files
the only method I know is
one file for reading from
and one file writing to

I cannot think of any other ways
3,405
Posted By 3junior
#!/bin/bash google picasa post --title "$1"...
#!/bin/bash
google picasa post --title "$1" $2/*.jpg # Add to an album


save the script to anyname.sh
chmod 755 anyname.sh
to upload pictures
./anyname.sh title path
ie. ./anyname.sh...
3,405
Posted By 3junior
why not just create a script with an argument to...
why not just create a script with an argument to specify location of folder to upload>?
16,754
Posted By 3junior
for i in `cat listfile` do orgfilename=`echo...
for i in `cat listfile`
do
orgfilename=`echo $i | awk '{print $1}'`
newfilename=`echo $i | awk 'print $5}'`
mv $orgfilename $(echo $orgfilename | sed s/pdf/$newfilename\.pdf/g)
done
1,680
Posted By 3junior
#!/usr/bin/perl use strict; use warnings; ...
#!/usr/bin/perl

use strict;
use warnings;

my ($filename1, $filename2, @FILE1, @FILE2, $line, $linenumber, @file1, @file2);
$filename1 = "file1.txt";
$filename2 = "file2.txt";
...
1,726
Posted By 3junior
PERL need help splitting argument
If i have a script name.pl
I run it like name.pl -v file.txt -t ext2 -u user -j
how can I edit the array @ARGV so when my script calls
$ARGV[0] = -v file.txt
$ARGV[3] = -j
13,405
Posted By 3junior
what I needed thanks
what I needed thanks
13,405
Posted By 3junior
perl use property file for variables
if I have a file that contains variables. How do I assign them in a script.

file
p=c
e=g

Thanks
Showing results 1 to 25 of 49

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