Quantcast
Channel: linuxadmin: Expanding Linux SysAdmin knowledge
Viewing all articles
Browse latest Browse all 17854

Problem with expansionof "_1" in bash for-loop has me stumped.

$
0
0

So, I have a directory:

[the_second@tischfoen test]$ ls test1.1 test2.1 test3.1 test4.1 [the_second@tischfoen test]$ 

...and I run:

[the_second@tischfoen test]$ for i in *.1; do echo "$i"; done test1.1 test2.1 test3.1 test4.1 [the_second@tischfoen test]$ 

...and then:

[the_second@tischfoen test]$ for i in *.1; do echo "$i_1"; done [the_second@tischfoen test]$ 

What does bash expand that "_1" to?

submitted by /u/the_second
[link] [comments]

Viewing all articles
Browse latest Browse all 17854