HI, guys, I am having some problem with the echo command, so I want to echo some text to a file name loginFile, the result inside the loginFile should looks like:
so what I did is:
but it just gave out:
The thing is I still need the double quote the start and the end of the echo since there are lines which I need to use variable, such as:
ANd because of the reason I cannot use the single quote as well
Just to sum up, I need something that looks like:
and can generate out the result above.
Thank you very much for your help really appreciate it
if you want to print the double quotes also in the file then just put a \ in front of the quotes you want to print.
double quotes are used to specify string and considered as a special character. if u are printing like this
then it takes 3 strings enclosed in 3 pair of double quotes
hence you are getting the result as expect >
if you want to remove the special meaning of any metacharacter , put a \ before that chatracter.
hi linux expert
I want to print the following lines ( or similar) with the echo command in csh script.
how to do it when the number of lines is high and the use of the \ symbol for each line is difficult?
Thanks in advance
samad
000 'iexpt ' = experiment number x10 (000=from... (4 Replies)
Dear Friends,
Please help me on this
my script name is send.csh
In this i have written the statement like this
set args = ( city state country price )
I want to pass this array to another c shell called receiver.csh. and i want to use it in this c shell
or
how to pass to... (2 Replies)
Hi All,
I have just installed my first Linux server ( Ubuntu 11.10 ).
I am sure I didn't allocate /swap , and double check by 'df -h', yes really no /swap
but when I use 'free -m' , returned a "Swap" line as below.
total used free shared buffers cached
Mem: ... (3 Replies)
for (( i=1; i<=3; i++ )); do
for (( j=1; j<=3; j++ )); do
for (( k=1; k<=3; k++ )); do
echo $i$j$k
done
done
done
Will the above code work on a BOURNE shell?
As far as my understanding is, if I am writing the above code in a file..say lol.sh and then running it through the terminal using... (7 Replies)
Hi guys,
So my code is below. This is a simplified version of the shell... It does not continue for ever... I guess its actually rather a program to accept a command.. has the fork and the execve etc. Anyways when i compile it and run it in the terminal for some reason only '/bin/echo "enter... (1 Reply)
I am trying to use echo in CSH and getting an error.
I want to use to tell the user which parameters are optional.
set msg2 = " -Inmod= -Nxz= -Varp="
echo $msg2 (3 Replies)
Hi.. Everyone...
Kindly consider following :
login as: root
Using keyboard-interactive authentication.
Password:
Last login: Mon Nov 3 19:30:50 2008 from xxxxxxxxxxx
Sun Microsystems Inc. SunOS 5.10 Generic January 2005
You have new mail.
Sourcing //.profile-EIS.....
#
#
... (3 Replies)
When i run this command on my linux machine:
mail -s "CVS ALERT-CRITCAL" sandy@xyz.com
The system hangs up producing a dead letter. What should i do to resolve this.
I am using :
mailx -s "CVS ALERT-CRITCAL" sandy@xyz.com
This cammnd works fine on another Linux machine but says"... (14 Replies)
Can somebody explain it to me that why wc gives more chars suppose
Ab.txt have two lines
qwer
qasd
then wc -c ab.txt will give 10.why not 8.okay may be it is taking count one for each line just in case but why echo "qwer"|wc -C gives 5.
Ok with \c it is returning 4. :) (6 Replies)