Penguin
Diff: ManipulatingStrings
EditPageHistoryDiffInfoLikePages

Differences between version 6 and previous revision of ManipulatingStrings.

Other diffs: Previous Major Revision, Previous Author, or view the Annotated Edit History

Newer page: version 6 Last edited on Monday, December 11, 2006 1:09:23 pm by BenStaz Revert
Older page: version 5 Last edited on Monday, December 11, 2006 1:05:18 pm by BenStaz Revert
@@ -50,4 +50,19 @@
 *${string%%substring} 
  
 For example if $string contained "This is a string" and we replaced substring with ''s*'' an echo would result in 
 ''Thi'' (The longest match) 
+  
+  
+!Concatenate variables.  
+  
+*echo ${string1}${string2}  
+  
+If we did:  
+  
+*echo $string1string2  
+  
+then bash would be looking for a variable called ''string1string2'' (which does not exist). This is why the curly brackets are necessary.  
+  
+Another Example:  
+  
+*echo ${string1}"Some more Text"