Hi folks,I have following script with preset directories which can be dated automatically when they ...
By satimis
Any AIX 5.3 programmers'I recently moved to AIX 5.3 and when I "xlc -qinfo foo.c" on AIX 5.3 it...
By noone_nowhere
hi all , i telnet to the ALOM on V440 to get the SC> prompt here i type console and nothing is ap...
By alfrednone
I'm trying to compile a test c file under gcc with red hat 7 using "gcc test.cpp". Everything g...
By skyice
Morning chaps,if I run the following commandawk < /dir/subdir/file ' /find me/ && FNR > 1...
By dundonald, 8 Comments
Hello,I am having a Perl script which tries to retrieve (via scp) a file froma remote machine. As I ...
By alexander, 1 Comments
Hi all,does anybody know a fast way to find a filename (recursive find of course)with case insensiti...
By f_marchioni, 3 Comments
Chris F.A. Johnson wrote:> On 2006-01-06, Rebel wrote: > There is no need for ls. In many case...
By swordsaintzero_gmail, 1 Comments
The GNU "make" has a special target, named .PHONY which isused thus:.PHONY: cleanclean:rm -f *.oThis...
By rouben_rostamian, 4 Comments
Thus spake KKramsch (karlUNDERSCOREkramsch...yahooPERIODcom.invalid):
> Is there any mechanism in zsh scripts for producing a string by
> concatenating n copies of a substring? I'm thinking something
> analogous to Perl's 'x' operator, e.g.
> "a" x 5 --> "aaaaa"
echo ${(l:5::a:)}
christian_schneider | Wed, 30 Apr 2008 10:29:00 GMT |
2004-11-15, 16:48(+00), KKramsch:
> Is there any mechanism in zsh scripts for producing a string by
> concatenating n copies of a substring? I'm thinking something
> analogous to Perl's 'x' operator, e.g.
> "a" x 5 --> "aaaaa"
[...]
Not as such, but there are padding expansion flags:
print ${(l:5::a:):-}
Left pads the empty string (${:-}) with 'a's with width "5".
Right padding example:
$ A=foo
$ print ${(r:30::bar:)A}
foobarbarbarbarbarbarbarbarbar
for a perl-like `x' operator, you need a loop:
var=
repeat 5 var=a$var
Stephane
stephane_chazelas | Wed, 30 Apr 2008 10:30:00 GMT |
KKramsch <karlUNDERSCOREkramsch...yahooperiodcom.invalid> wrote:
> Is there any mechanism in zsh scripts for producing a string by
> concatenating n copies of a substring? I'm thinking something
> analogous to Perl's 'x' operator, e.g.
> "a" x 5 --> "aaaaa"
Not sure about Zsh, but for Bash
http://groups.google.com/groups?sel...1...uni-berlin.de
williampark | Wed, 30 Apr 2008 10:31:00 GMT |
Thus spake KKramsch (karlUNDERSCOREkramsch...yahooPERIODcom.invalid):
> Is there any mechanism in zsh scripts for producing a string by
> concatenating n copies of a substring? I'm thinking something
> analogous to Perl's 'x' operator, e.g.
> "a" x 5 --> "aaaaa"
echo ${(l:5::a:)}
christian_schneider | Wed, 30 Apr 2008 10:32:00 GMT |