> Is there an easy way using bash INTERNALS to do the following:
>
> Read in a file containing two numbers on one line separated by
> space, and replace the whitespace between them with a ":"?
>
> I'm trying to optimize some stuff in a script and trying to get
> rid of awk/sed/perl calls that are unnecessary.
>
> The input file contains:
>
> 2345 5678
>
> I'd like something along the lines of:
>
> DATA=${blahblash} < /somefile
>
> Where ${blahblash} is one of the confusing bash constructs called
> parameter expansion or whatever..
>
> I just don't grok the bash manpage and the usage of parameter
> expansion.
>
> What I'd like though is this one liner to transform stdin from:
>
> 2345 5678 into: 2345:5678
>
> The amount of whitespace in between the two numbers in the input
> file may vary. ie:
>
> 2345 5678
>
> Any ideas? I'm using the following right now:
You can do it in bash-2. However, I really think sed will prove faster.
For advanced bashing, I recommend you get a fishy (looks to me like some kind
of perch) book from oreilly's.
_______________________________________________
Redhat-devel-list mailing list
[EMAIL PROTECTED]
https://listman.redhat.com/mailman/listinfo/redhat-devel-list