Hi all,
having created a complicated (for me) awk statement previously with the
forums' help I am now amending it and trying to pass variables to it. My
script is as follows with the respective outputs (hash then unhash when
running etc) for:-
1. variable var1 passed containing Framed-IP-Address
TimtheEagle <[EMAIL PROTECTED]> writes:
This is actually all unrelated to bash.
> + awk -v 'var1=Framed-IP-Address = 10\.6\.6\.' '/*** Received from
> 10.242.252.20 port 1645 /{ last_acct_status = NR; as = $0 }/Code:
`*' and `.' are special in regexps, you need to quote them to match t
$ printf %d\\n \'À
-61
(expected 192)
This should be 192 regardless of locale on any system where wchar_t
values are ISO-10646/Unicode. Bash is incorrectly reading the first
byte of the UTF-8 which happens to be -61 when interpreted as signed
char; on a Latin-1 based locale it will probably give -
vi test.sh
$0 = "test";
tail -f /var/log/messages
chmod +x test.sh
../test.sh
Seems to spawn loads of bash processes.
2.6.22-14-386 Linux
GNU bash, version 3.2.25(1)-release (i486-pc-linux-gnu)
Hello,
On Thu, Nov 01, 2007 at 11:25:58AM +, Steve P wrote:
> $0 = "test";
expands to "../test.sh = test" and recurses (runs itself with parameters "="
and "test").
> tail -f /var/log/messages
>
> chmod +x test.sh
> ../test.sh
--
Tomas Janousek, SW Engineer, Red Hat, Inc.
In tcsh the command run-fg-editor bound by default to C-M-z is
extremely useful when you have an editor suspended.
It makes it very easy to return to the editor, do some editing, then
suspend the editor again, and the command line is restored in exactly
the same state as it was before doing C-M-z
In tcsh %c can be used to only show the last few directory names in a
path (also see the ellipsis variable).
For example for this directory:
/lib/modules/2.6.21-1.3194.fc7/kernel/drivers/char/hw_random/
the prompt can look like this:
[EMAIL PROTECTED]:...drivers/char/hw_random>
when using
I've been struggling with the following code of reading a text file
(test.txt) and counting the number of lines. Well, I know there're simpler
method to count the number of lines of a text file, but that's not the point
of this post.
__
n=0
cat test.txt |
while read line
do
n=$(
On Thu, Nov 01, 2007 at 07:48:13AM -0700, Dan Nicolaescu wrote:
>
> In tcsh the command run-fg-editor bound by default to C-M-z is
> extremely useful when you have an editor suspended.
> It makes it very easy to return to the editor, do some editing, then
> suspend the editor again, and the comma
Horinius <[EMAIL PROTECTED]> wrote:
> cat test.txt |
> while read line
Read entry E4 in the bash FAQ:
http://tiswww.case.edu/php/chet/bash/FAQ
paul
On Thu, Nov 01, 2007 at 08:01:58AM -0700, Dan Nicolaescu wrote:
>
> In tcsh %c can be used to only show the last few directory names in a
> path (also see the ellipsis variable).
>
> For example for this directory:
>
> /lib/modules/2.6.21-1.3194.fc7/kernel/drivers/char/hw_random/
>
> the pro
Stephane Chazelas <[EMAIL PROTECTED]> writes:
> On Thu, Nov 01, 2007 at 08:01:58AM -0700, Dan Nicolaescu wrote:
> >
> > In tcsh %c can be used to only show the last few directory names in a
> > path (also see the ellipsis variable).
> >
> > For example for this directory:
> >
12 matches
Mail list logo