Results 1 to 3 of 3
1)what is the diff between echo and cat.
cat displays the output of a file on the screen. dont echo does about the same?
2)Can anyone explain this command to ...
- 07-22-2010 #1Just Joined!
- Join Date
- Jun 2010
- Posts
- 29
Command question
1)what is the diff between echo and cat.
cat displays the output of a file on the screen. dont echo does about the same?
2)Can anyone explain this command to be?
sh -c " echo 'export XMODIFIERS=@im=SCIM ; export GTK_IM_MODULE="scim" ; export QT_IM_MODULE="scim" ; scim -d " > /etc/X11/Xsession.d/95xinput"
I need it to install chinese
tia
- 07-22-2010 #2
Question 1)
Try this in terminal:
"apropos" knows all commands and what they do. You just have to ask.
apropos echo
apropos cat.
Hope That Helps,
Dave
- 07-23-2010 #3
Regarding 1], there are also the manual pages "man echo / man cat"
Regarding 2]
sh -c executes the command string followed; "man sh" tells me this:
So this is the code to be executed:Code:-c string If the -c option is present, then commands are read from string. If there are arguments after the string, they are assigned to the positional parameters, starting with $0.
Disassembling this yields that you want to write this:Code:echo 'export XMODIFIERS=@im=SCIM ; export GTK_IM_MODULE="scim" ; export QT_IM_MODULE="scim" ; scim -d " > /etc/X11/Xsession.d/95xinput
to the file /etc/X11/Xsession.d/95xinputCode:export XMODIFIERS=@im=SCIM ; export GTK_IM_MODULE="scim" ; export QT_IM_MODULE="scim" ; scim -d
unfortunatly you have a syntax error (quotes are wrong), thus the script should not work at all.
I hope this explanation helps you solving such things by yourself in the future.


Reply With Quote