Hello Patrick,
Your suggestion works perfectly. Thank you very much for helping a learner such
as myself.
Ang.
Proniewski Patrick <[EMAIL PROTECTED]> wrote: On 29 janv. 06, at 16:10, Angelo
Christou wrote:
> list.txt contains:
>
> bob home 9002
> jim data 9005
> Running the following for e
On 29 janv. 06, at 16:10, Angelo Christou wrote:
list.txt contains:
bob home 9002
jim data 9005
Running the following for each line is what I'm trying to do:
myprogram bob home 9002
myprogram jim data 9005
and so on..
give this a try:
while read myline; do
set -- $myline
myprogr
Hello, I am running FreeBSD 6.0 with Bash as my shell. I am trying to automate
a task and I have been reading a lot about Bash, but I haven't been able to get
a script working.
I have a program that I need to pass 3 variables. I have a text file called
list.txt that has the variables separated
in message <[EMAIL PROTECTED]>,
wrote Paul Schmehl thusly...
>
> --On July 30, 2005 2:57:57 AM -0400 Parv <[EMAIL PROTECTED]> wrote:
>
> >in message <[EMAIL PROTECTED]>,
> >wrote Paul Schmehl thusly...
...
> >>@${SED} -e '/man\.macros/r man.macros' -e '/man\.macros/d'
> >>${WRKSRC}/doc/${f} \
> >>
--On July 30, 2005 2:57:57 AM -0400 Parv <[EMAIL PROTECTED]> wrote:
in message <[EMAIL PROTECTED]>,
wrote Paul Schmehl thusly...
Running what I *thought* was the same sed command in the Makefile
of the port doesn't solve the problem of the formatting of the man
pages, but it doesn't generate a
in message <[EMAIL PROTECTED]>, wrote Parv
thusly...
>
> in message
> <[EMAIL PROTECTED]>, wrote
> Paul Schmehl thusly...
> >
> > @${SED} -e '/man\.macros/r man.macros'
...
> In the 1st part, sed sends the output of file 'man.macros' to
^ ^ ^ ^ ^ ^ ^
in message <[EMAIL PROTECTED]>,
wrote Paul Schmehl thusly...
>
> Running what I *thought* was the same sed command in the Makefile
> of the port doesn't solve the problem of the formatting of the man
> pages, but it doesn't generate any errors either:
>
> @${SED} -e '/man\.macros/r man.macros' -e
I'm working on a new port, and the one thing I can't seem to solve is the
man pages. They install fine, but they're not formatted right.
In the Makefile that is built from configure, this is the section that
handles the man pages:
@cd $(TOP_DIR)/doc; for i in *.n; \
do \
Norberto Meijome wrote:
Kevin Kinsey wrote:
=
# Rule number variable
RuleNum=100
#
# this function increments $RulNum var by 100... #
#
inc () {
RuleNum=$(expr $1 "+" 100)
}
##
# LET'S G
Mike Jeays wrote:
"man expr" to give the short answer to your first question:
As an example, x=`expr $x + 1`
536 ~ $ x=4
537 ~ $ x=`expr $x + 1`
538 ~ $ echo $
Note the back-quotes to execute a command and return the result, and the
need for spaces between each token in the expr command.
sh
Kevin Kinsey wrote:
=
# Rule number variable
RuleNum=100
#
# this function increments $RulNum var by 100... #
#
inc () {
RuleNum=$(expr $1 "+" 100)
}
##
# LET'S GET STARTED #
Mike Jeays wrote:
On Tue, 2005-06-28 at 22:52, fbsd_user wrote:
My sh shell script ability is not that good.
Have 2 simple coding problems.
How do I code a statement to subtract one from a field.
$rulenum = $rulenum - 1
$rulenum = '$rulenum - 1'
one='1'
$rulenum = $rulenum - $one
$rulenum
On Tue, 2005-06-28 at 22:52, fbsd_user wrote:
> My sh shell script ability is not that good.
> Have 2 simple coding problems.
>
> How do I code a statement to subtract one from a field.
>
> $rulenum = $rulenum - 1
> $rulenum = '$rulenum - 1'
>
> one='1'
> $rulenum = $rulenum - $one
> $rulenum='$
My sh shell script ability is not that good.
Have 2 simple coding problems.
How do I code a statement to subtract one from a field.
$rulenum = $rulenum - 1
$rulenum = '$rulenum - 1'
one='1'
$rulenum = $rulenum - $one
$rulenum='$rulenum - $one'
None of that works. must really be simple.
I also
Awesome that worked ..Im also going to try some of the other options you
had mentioned..I wanted to thank you for your help :-)
This has got to be the best dam mailing list there is :-)
--
Brent Bailey CCNA
Bmyster LLC
Computer Networking and Webhosting
Network Engineer, Webmaster, President
http
The more I play with your script, the more fun it becomes.
#!/bin/sh
# this is a script to check drive space and email HSD dept.
#
cd ~bbailey
rm drvspc.txt # Once I'm in ~bbailey, I don't need the complete path to
any files there.
df -k |
# You have to get rid of the word 'Capacity' or your co
> #!/bin/sh
> # this is a script to check drive space and email HSD dept.
> #
> cd ~bbailey
> rm ~bbailey/drvspc.txt
> df -k | awk '{print$5}' >~bbailey/drvspc.txt
> cat drvspc.txt
> while read i
> do
> if [$i > '89']; then
This line should be:
if [ $i -gt 89 ] ; then
The spaces
Im trying to write a script that will email me when drive space on any
given partition is above a certain value.
i was trying this ...but no working ...
#!/bin/sh
# this is a script to check drive space and email HSD dept.
#
cd ~bbailey
rm ~bbailey/drvspc.txt
df -k | awk '{print$5}' >~bbailey/d
On Wed, 2003-07-23 at 02:04, David Bear wrote:
> I'm trying to clean up a script that controls my tape better. Among
> other things it sets some variable to use later. I've made an error
> somewhere and I'm thinking that I'm missing the obvious since I cant
> find the error. I want to set comman
I'm trying to clean up a script that controls my tape better. Among
other things it sets some variable to use later. I've made an error
somewhere and I'm thinking that I'm missing the obvious since I cant
find the error. I want to set command line options for tar. Below
taroptions has what I wa
20 matches
Mail list logo