View Full Version : What is the output of the command '^$' in unix? - **SOLVED**
Top-Dawg
07-16-2008, 02:55 AM
What is the output of the command '^$' in unix?
I came across this command in one the the shell scripts (based on sun solaris) I am not able to understand what is does and what its output is...
Dee369
07-16-2008, 03:53 AM
What is the output of the command '^$' in unix?
I came across this command in one the the shell scripts (based on sun solaris) I am not able to understand what is does and what its output is...
Substitutes a string on the previous command line and executes the new line.
For instance:
$ cd cx328
-bash: cd: cx328: No such file or directory
$ ^8^9
~/cx329$
The number 8 was replaced with the number 9 and the command "cd cx328" was replaced with "cd cx329" and re-executed.
It will probably make more sense this way.
(The lines starting with $ are the commands I'm issuing, everything else is output)
$ echo treehouse
treehouse
$ ^tree^boat
echo boathouse
boathouse
Hope that helps you. :)
Top-Dawg
07-16-2008, 06:19 AM
Again, I thank you. :) Dawg
Dee369
07-16-2008, 06:21 AM
You're welcome :)
allheart55
07-16-2008, 06:22 AM
Tech Problem ***SOLVED***
The technical problem relating to this thread has been resolved!
Please refrain from any additional posting in this thread unless there is an UPDATE to the original problem or new and relevant information related to the topic.
Additional postings may be removed without notice.
Thank you!
KH Mod Squad
vBulletin® v3.7.2, Copyright ©2000-2009, Jelsoft Enterprises Ltd.