I am learning Shell Programming ..but the book I have is "Unix Shell Programming" and I know there are gonna be some differences, but in this case, Error Redirection is not working as wanted... Here's the script. i=a echo `i` 2>> err Can somebody point out the error? ..if there's any ..lol Also, I want to install "ksh" on SuSE. Just wanted to ask whether it is provided with the default installation..or is it present in the Cds..or do the Repositories offer them? I had added non-free reps in my SuSE Installation Sources, but I don't think I was able to find "ksh" in the list. PS: I have also included Packman. -- http://mckagan.googlepages.com
echo $i >> err Using `` or $() is to execute something, not to reference i. On Sun, 15 Oct 2006, Duff Mckagan wrote:
I am learning Shell Programming ..but the book I have is "Unix Shell Programming" and I know there are gonna be some differences, but in this case, Error Redirection is not working as wanted...
Here's the script.
i=a echo `i` 2>> err
Can somebody point out the error? ..if there's any ..lol
Also, I want to install "ksh" on SuSE. Just wanted to ask whether it is provided with the default installation..or is it present in the Cds..or do the Repositories offer them? I had added non-free reps in my SuSE Installation Sources, but I don't think I was able to find "ksh" in the list.
PS: I have also included Packman.
On 10/15/06, Justin Piszcz
echo $i >> err
Using `` or $() is to execute something, not to reference i.
I know! But thats not the point. The problem is...that My 'echo' command will generate an error and that error should be redirected to a file called "err" . The problem is ...such redirection is not achieved due to some flaw in my code. On Sun, 15 Oct 2006, Duff Mckagan wrote:
I am learning Shell Programming ..but the book I have is "Unix Shell Programming" and I know there are gonna be some differences, but in this case, Error Redirection is not working as wanted...
Here's the script.
i=a echo `i` 2>> err
Can somebody point out the error? ..if there's any ..lol
Also, I want to install "ksh" on SuSE. Just wanted to ask whether it is provided with the default installation..or is it present in the Cds..or do the Repositories offer them? I had added non-free reps in my SuSE Installation Sources, but I don't think I was able to find "ksh" in the list.
PS: I have also included Packman.
I think its because it is a bash built-in, you cannot (easily) grab the contents of time either (but /usr/bin/time works). user@host:~$ printf `i` 2>> err bash: i: command not found user@host:~$ cat err printf: usage: printf [-v var] format [arguments] user@host:~$ Does that help? On Sun, 15 Oct 2006, Duff Mckagan wrote:
On 10/15/06, Justin Piszcz
wrote: echo $i >> err
Using `` or $() is to execute something, not to reference i.
I know! But thats not the point.
The problem is...that My 'echo' command will generate an error and that error should be redirected to a file called "err" .
The problem is ...such redirection is not achieved due to some flaw in my code.
On Sun, 15 Oct 2006, Duff Mckagan wrote:
I am learning Shell Programming ..but the book I have is "Unix Shell Programming" and I know there are gonna be some differences, but in this case, Error Redirection is not working as wanted...
Here's the script.
i=a echo `i` 2>> err
Can somebody point out the error? ..if there's any ..lol
Also, I want to install "ksh" on SuSE. Just wanted to ask whether it is provided with the default installation..or is it present in the Cds..or do the Repositories offer them? I had added non-free reps in my SuSE Installation Sources, but I don't think I was able to find "ksh" in the list.
PS: I have also included Packman.
On 10/15/06, Justin Piszcz
I think its because it is a bash built-in, you cannot (easily) grab the contents of time either (but /usr/bin/time works).
user@host:~$ printf `i` 2>> err bash: i: command not found user@host:~$ cat err
This one..??? printf: usage: printf [-v var] format [arguments]
user@host:~$
Not really...Not sure I understood this. Do you wanna say that I need to put in some more arguments and then I will be able to grab the error? Well..lets see...I tried another redirection problem...but it works this time. Seems like the problem lies only with the echo command. ls xx 2> err This works fine. The error is redirected to "err" . Does that help?
On Sun, 15 Oct 2006, Duff Mckagan wrote:
On 10/15/06, Justin Piszcz
wrote: echo $i >> err
Using `` or $() is to execute something, not to reference i.
I know! But thats not the point.
The problem is...that My 'echo' command will generate an error and that error should be redirected to a file called "err" .
The problem is ...such redirection is not achieved due to some flaw in my code.
On Sun, 15 Oct 2006, Duff Mckagan wrote:
I am learning Shell Programming ..but the book I have is "Unix Shell Programming" and I know there are gonna be some differences, but in
this
case, Error Redirection is not working as wanted...
Here's the script.
i=a echo `i` 2>> err
Can somebody point out the error? ..if there's any ..lol
Also, I want to install "ksh" on SuSE. Just wanted to ask whether it is provided with the default installation..or is it present in the Cds..or do the Repositories offer them? I had added non-free reps in my SuSE Installation Sources, but I don't think I was able to find "ksh" in the list.
PS: I have also included Packman.
ls xx 2> err This works fine. The error is redirected to "err" .
Yes, because ls is not a bash built-in, but echo and time are. $ type -a time time is a shell keyword $ type -a echo echo is a shell builtin I believe stdout/stderr do not work properly for shell built-ins. Justin. On Sun, 15 Oct 2006, Duff Mckagan wrote:
On 10/15/06, Justin Piszcz
wrote: I think its because it is a bash built-in, you cannot (easily) grab the contents of time either (but /usr/bin/time works).
user@host:~$ printf `i` 2>> err bash: i: command not found user@host:~$ cat err
This one..???
printf: usage: printf [-v var] format [arguments]
user@host:~$
Not really...Not sure I understood this. Do you wanna say that I need to put in some more arguments and then I will be able to grab the error?
Well..lets see...I tried another redirection problem...but it works this time. Seems like the problem lies only with the echo command.
ls xx 2> err
This works fine. The error is redirected to "err" .
Does that help?
On Sun, 15 Oct 2006, Duff Mckagan wrote:
On 10/15/06, Justin Piszcz
wrote: echo $i >> err
Using `` or $() is to execute something, not to reference i.
I know! But thats not the point.
The problem is...that My 'echo' command will generate an error and that error should be redirected to a file called "err" .
The problem is ...such redirection is not achieved due to some flaw in my code.
On Sun, 15 Oct 2006, Duff Mckagan wrote:
I am learning Shell Programming ..but the book I have is "Unix Shell Programming" and I know there are gonna be some differences, but in
this
case, Error Redirection is not working as wanted...
Here's the script.
i=a echo `i` 2>> err
Can somebody point out the error? ..if there's any ..lol
Also, I want to install "ksh" on SuSE. Just wanted to ask whether it is provided with the default installation..or is it present in the Cds..or do the Repositories offer them? I had added non-free reps in my SuSE Installation Sources, but I don't think I was able to find "ksh" in the list.
PS: I have also included Packman.
On 10/15/06, Justin Piszcz
ls xx 2> err This works fine. The error is redirected to "err" .
Yes, because ls is not a bash built-in, but echo and time are.
$ type -a time time is a shell keyword
$ type -a echo echo is a shell builtin
I believe stdout/stderr do not work properly for shell built-ins.
Justin.
I see..I got you this time...thanks for the information. :) Well..can you help me with the ksh part? I wanna install it on SuSE. I can't find it nowhere. There are RPMs..but I am afraid to run into dependency problems that might arise due to use of Single RPMs. Do you have an idea about any repository that hosts ksh? On Sun, 15 Oct 2006, Duff Mckagan wrote:
On 10/15/06, Justin Piszcz
wrote: I think its because it is a bash built-in, you cannot (easily) grab
the
contents of time either (but /usr/bin/time works).
user@host:~$ printf `i` 2>> err bash: i: command not found user@host:~$ cat err
This one..???
printf: usage: printf [-v var] format [arguments]
user@host:~$
Not really...Not sure I understood this. Do you wanna say that I need to put in some more arguments and then I will be able to grab the error?
Well..lets see...I tried another redirection problem...but it works this time. Seems like the problem lies only with the echo command.
ls xx 2> err
This works fine. The error is redirected to "err" .
Does that help?
On Sun, 15 Oct 2006, Duff Mckagan wrote:
On 10/15/06, Justin Piszcz
wrote: echo $i >> err
Using `` or $() is to execute something, not to reference i.
I know! But thats not the point.
The problem is...that My 'echo' command will generate an error and
that
error should be redirected to a file called "err" .
The problem is ...such redirection is not achieved due to some flaw in my code.
On Sun, 15 Oct 2006, Duff Mckagan wrote:
I am learning Shell Programming ..but the book I have is "Unix
Programming" and I know there are gonna be some differences, but in
Shell this
case, Error Redirection is not working as wanted...
Here's the script.
i=a echo `i` 2>> err
Can somebody point out the error? ..if there's any ..lol
Also, I want to install "ksh" on SuSE. Just wanted to ask whether it is provided with the default installation..or is it present in the Cds..or do the Repositories offer them? I had added non-free reps in my SuSE Installation Sources, but I don't think I was able to find "ksh" in the list.
PS: I have also included Packman.
For KSH, you could grab the RPM from http://rpmfind.net/ -- ksh has no odd-ball dependencies: $ ldd ksh linux-gate.so.1 => (0xffffe000) libdl.so.2 => /lib/tls/libdl.so.2 (0xb7ef9000) libm.so.6 => /lib/tls/libm.so.6 (0xb7ed4000) libc.so.6 => /lib/tls/libc.so.6 (0xb7da1000) /lib/ld-linux.so.2 (0xb7f14000) So you should be fine if you get one from rpmfind.net; however, I do not know of a specific repository for SuSE+KSH, sorry. Justin. On Sun, 15 Oct 2006, Duff Mckagan wrote:
On 10/15/06, Justin Piszcz
wrote: ls xx 2> err This works fine. The error is redirected to "err" .
Yes, because ls is not a bash built-in, but echo and time are.
$ type -a time time is a shell keyword
$ type -a echo echo is a shell builtin
I believe stdout/stderr do not work properly for shell built-ins.
Justin.
I see..I got you this time...thanks for the information. :)
Well..can you help me with the ksh part?
I wanna install it on SuSE. I can't find it nowhere. There are RPMs..but I am afraid to run into dependency problems that might arise due to use of Single RPMs.
Do you have an idea about any repository that hosts ksh?
On Sun, 15 Oct 2006, Duff Mckagan wrote:
On 10/15/06, Justin Piszcz
wrote: I think its because it is a bash built-in, you cannot (easily) grab
the
contents of time either (but /usr/bin/time works).
user@host:~$ printf `i` 2>> err bash: i: command not found user@host:~$ cat err
This one..???
printf: usage: printf [-v var] format [arguments]
user@host:~$
Not really...Not sure I understood this. Do you wanna say that I need to put in some more arguments and then I will be able to grab the error?
Well..lets see...I tried another redirection problem...but it works this time. Seems like the problem lies only with the echo command.
ls xx 2> err
This works fine. The error is redirected to "err" .
Does that help?
On Sun, 15 Oct 2006, Duff Mckagan wrote:
On 10/15/06, Justin Piszcz
wrote: echo $i >> err
Using `` or $() is to execute something, not to reference i.
I know! But thats not the point.
The problem is...that My 'echo' command will generate an error and
that
error should be redirected to a file called "err" .
The problem is ...such redirection is not achieved due to some flaw in my code.
On Sun, 15 Oct 2006, Duff Mckagan wrote:
> I am learning Shell Programming ..but the book I have is "Unix
> Programming" and I know there are gonna be some differences, but in
Shell this
> case, Error Redirection is not working as wanted... > > Here's the script. > > i=a > echo `i` 2>> err > > Can somebody point out the error? ..if there's any ..lol > > > Also, I want to install "ksh" on SuSE. > Just wanted to ask whether it is provided with the default installation..or > is it present in the Cds..or do the Repositories offer them? > I had added non-free reps in my SuSE Installation Sources, but I don't think > I was able to find "ksh" in the list. > > PS: I have also included Packman. > > > -- > http://mckagan.googlepages.com >
On 10/15/06, Justin Piszcz
For KSH, you could grab the RPM from http://rpmfind.net/ -- ksh has no odd-ball dependencies:
$ ldd ksh linux-gate.so.1 => (0xffffe000) libdl.so.2 => /lib/tls/libdl.so.2 (0xb7ef9000) libm.so.6 => /lib/tls/libm.so.6 (0xb7ed4000) libc.so.6 => /lib/tls/libc.so.6 (0xb7da1000) /lib/ld-linux.so.2 (0xb7f14000)
So you should be fine if you get one from rpmfind.net; however, I do not know of a specific repository for SuSE+KSH, sorry.
Ah..okay..glad to hear that ksh has got no unusual dependencies. I will grab the RPM then... Justin.
On Sun, 15 Oct 2006, Duff Mckagan wrote:
On 10/15/06, Justin Piszcz
wrote: ls xx 2> err This works fine. The error is redirected to "err" .
Yes, because ls is not a bash built-in, but echo and time are.
$ type -a time time is a shell keyword
$ type -a echo echo is a shell builtin
I believe stdout/stderr do not work properly for shell built-ins.
Justin.
I see..I got you this time...thanks for the information. :)
Well..can you help me with the ksh part?
I wanna install it on SuSE. I can't find it nowhere. There are RPMs..but I am afraid to run into dependency problems that might arise due to use of Single RPMs.
Do you have an idea about any repository that hosts ksh?
On Sun, 15 Oct 2006, Duff Mckagan wrote:
On 10/15/06, Justin Piszcz
wrote: I think its because it is a bash built-in, you cannot (easily)
the
contents of time either (but /usr/bin/time works).
user@host:~$ printf `i` 2>> err bash: i: command not found user@host:~$ cat err
This one..???
printf: usage: printf [-v var] format [arguments]
user@host:~$
Not really...Not sure I understood this. Do you wanna say that I need to put in some more arguments and then I will be able to grab the error?
Well..lets see...I tried another redirection problem...but it works
grab this
time. Seems like the problem lies only with the echo command.
ls xx 2> err
This works fine. The error is redirected to "err" .
Does that help?
On Sun, 15 Oct 2006, Duff Mckagan wrote:
On 10/15/06, Justin Piszcz
wrote: > > > echo $i >> err > > Using `` or $() is to execute something, not to reference i. I know! But thats not the point.
The problem is...that My 'echo' command will generate an error
and that
error should be redirected to a file called "err" .
The problem is ...such redirection is not achieved due to some flaw in my code.
On Sun, 15 Oct 2006, Duff Mckagan wrote: > > > I am learning Shell Programming ..but the book I have is "Unix Shell > > Programming" and I know there are gonna be some differences, but in this > > case, Error Redirection is not working as wanted... > > > > Here's the script. > > > > i=a > > echo `i` 2>> err > > > > Can somebody point out the error? ..if there's any ..lol > > > > > > Also, I want to install "ksh" on SuSE. > > Just wanted to ask whether it is provided with the default > installation..or > > is it present in the Cds..or do the Repositories offer them? > > I had added non-free reps in my SuSE Installation Sources, but I don't > think > > I was able to find "ksh" in the list. > > > > PS: I have also included Packman. > > > > > > -- > > http://mckagan.googlepages.com > > >
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 The Sunday 2006-10-15 at 11:53 -0000, Duff Mckagan wrote:
echo $i >> err
Using `` or $() is to execute something, not to reference i.
I know! But thats not the point.
The problem is...that My 'echo' command will generate an error and that error should be redirected to a file called "err" .
No, it should not. You are redirecting standard output only, not standard error output.
Also, I want to install "ksh" on SuSE. Just wanted to ask whether it is provided with the default installation..or is it present in the Cds..or do the Repositories offer them?
Yes. - -- Cheers, Carlos E. R. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2 (GNU/Linux) Comment: Made with pgp4pine 1.76 iD8DBQFFMjDetTMYHG2NR9URAmEXAJ9pXvBegWSPtIR5lq3uylf1+aP4yACgi1f6 uDCTTYDaQQPebYk0JatK6f4= =NHN6 -----END PGP SIGNATURE-----
On 10/15/06, Carlos E. R.
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
The Sunday 2006-10-15 at 11:53 -0000, Duff Mckagan wrote:
echo $i >> err
Using `` or $() is to execute something, not to reference i.
I know! But thats not the point.
The problem is...that My 'echo' command will generate an error and that error should be redirected to a file called "err" .
No, it should not. You are redirecting standard output only, not standard error output.
You mean to say that with the following script, I am redirecting Standard Output only? i=a echo `i` 2>> err 2> is used for redirecting errors, right?
Also, I want to install "ksh" on SuSE.
Just wanted to ask whether it is provided with the default installation..or is it present in the Cds..or do the Repositories offer them?
Yes.
- -- Cheers, Carlos E. R.
-----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2 (GNU/Linux) Comment: Made with pgp4pine 1.76
iD8DBQFFMjDetTMYHG2NR9URAmEXAJ9pXvBegWSPtIR5lq3uylf1+aP4yACgi1f6 uDCTTYDaQQPebYk0JatK6f4= =NHN6 -----END PGP SIGNATURE-----
-- Check the headers for your unsubscription address For additional commands send e-mail to suse-linux-e-help@suse.com Also check the archives at http://lists.suse.com Please read the FAQs: suse-linux-e-faq@suse.com
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 The Sunday 2006-10-15 at 22:52 +0530, Duff Mckagan wrote:
The Sunday 2006-10-15 at 11:53 -0000, Duff Mckagan wrote:
echo $i >> err
...
No, it should not. You are redirecting standard output only, not standard error output.
You mean to say that with the following script, I am redirecting Standard Output only?
No, with the _above_ script (please notice standard email quoting practices).
i=a echo `i` 2>> err
2> is used for redirecting errors, right?
Yes. Notice that the ">>" means append to file, while ">" will create the file. Therefore, the "2>> err" translate as append error output to file "err". If you intend to redirect both normal output and error output, you use "&>2" instead. See "man bash", paragraph REDIRECTION. - -- Cheers, Carlos E. R. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2 (GNU/Linux) Comment: Made with pgp4pine 1.76 iD8DBQFFMo3mtTMYHG2NR9URAnoHAJ9d9CnJoqrhF1U9BN3gkBWSRex/HACfRzKv hOfi7USWoKzXtm7o3os9erA= =QeoI -----END PGP SIGNATURE-----
* Duff Mckagan
Also, I want to install "ksh" on SuSE. Just wanted to ask whether it is provided with the default installation..or is it present in the Cds..or do the Repositories offer them? I had added non-free reps in my SuSE Installation Sources, but I don't think I was able to find "ksh" in the list.
PS: I have also included Packman.
Hummmm, it's on the dvd: 08:14 wahoo:~ > pin ksh grepping /var/lib/pin/ARCHIVES.gz ... please wait ---> ./DVD1/suse/i586/ksh-93r-8.i586.rpm ---> ./DVD1/suse/i586/ksh-devel-93r-8.i586.rpm ---> ./DVD1/suse/i586/pdksh-5.2.14-801.i586.rpm ---> ./DVD1/suse/x86_64/ksh-93r-8.x86_64.rpm ---> ./DVD1/suse/x86_64/ksh-devel-93r-8.x86_64.rpm ---> ./DVD1/suse/x86_64/pdksh-5.2.14-801.x86_64.rpm -- Patrick Shanahan Registered Linux User #207535 http://wahoo.no-ip.org @ http://counter.li.org HOG # US1244711 Photo Album: http://wahoo.no-ip.org/gallery2
On 10/15/06, Patrick Shanahan
* Duff Mckagan
[10-15-06 07:47]: Also, I want to install "ksh" on SuSE. Just wanted to ask whether it is provided with the default
is it present in the Cds..or do the Repositories offer them? I had added non-free reps in my SuSE Installation Sources, but I don't
installation..or think
I was able to find "ksh" in the list.
PS: I have also included Packman.
Hummmm, it's on the dvd:
08:14 wahoo:~ > pin ksh
grepping /var/lib/pin/ARCHIVES.gz ... please wait
---> ./DVD1/suse/i586/ksh-93r-8.i586.rpm ---> ./DVD1/suse/i586/ksh-devel-93r-8.i586.rpm ---> ./DVD1/suse/i586/pdksh-5.2.14-801.i586.rpm ---> ./DVD1/suse/x86_64/ksh-93r-8.x86_64.rpm ---> ./DVD1/suse/x86_64/ksh-devel-93r-8.x86_64.rpm ---> ./DVD1/suse/x86_64/pdksh-5.2.14-801.x86_64.rpm
Hmm..but I have SuSE 10.0 ..and I have got those 5 CDs..and no DVD..:( Not sure if that will help. :) Downloading the RPM will do just fine if there are not unusual dependencies to be worried about. -- http://mckagan.googlepages.com
* Duff Mckagan
Hmm..but I have SuSE 10.0 ..and I have got those 5 CDs..and no DVD..:(
Not sure if that will help. :)
What does "10.0" have to do with it? The OP didn't specify which version so current is assumed, and if he doesn't have the dvd, it is available online from OpenSUSE. note: It is very difficult to see what is on a person's machine without access to that machine or declaration on the post. -- Patrick Shanahan Registered Linux User #207535 http://wahoo.no-ip.org @ http://counter.li.org HOG # US1244711 Photo Album: http://wahoo.no-ip.org/gallery2
On 10/15/06, Patrick Shanahan
* Duff Mckagan
[10-15-06 08:27]: Hmm..but I have SuSE 10.0 ..and I have got those 5 CDs..and no DVD..:(
Not sure if that will help. :)
What does "10.0" have to do with it? The OP didn't specify which version so current is assumed, and if he doesn't have the dvd, it is available online from OpenSUSE.
note: It is very difficult to see what is on a person's machine without access to that machine or declaration on the post. --
Aah..that was me man!! -- http://mckagan.googlepages.com
Patrick Shanahan wrote:
* Duff Mckagan
[10-15-06 07:47]: Also, I want to install "ksh" on SuSE. Just wanted to ask whether it is provided with the default installation..or is it present in the Cds..or do the Repositories offer them? I had added non-free reps in my SuSE Installation Sources, but I don't think I was able to find "ksh" in the list.
PS: I have also included Packman.
Hummmm, it's on the dvd:
08:14 wahoo:~ > pin ksh
grepping /var/lib/pin/ARCHIVES.gz ... please wait
---> ./DVD1/suse/i586/ksh-93r-8.i586.rpm ---> ./DVD1/suse/i586/ksh-devel-93r-8.i586.rpm ---> ./DVD1/suse/i586/pdksh-5.2.14-801.i586.rpm ---> ./DVD1/suse/x86_64/ksh-93r-8.x86_64.rpm ---> ./DVD1/suse/x86_64/ksh-devel-93r-8.x86_64.rpm ---> ./DVD1/suse/x86_64/pdksh-5.2.14-801.x86_64.rpm
You will want either ksh-93 or pdksh, not both. You will find both on the cd sets as well as the dvd for 10.0. -- Until later, Geoffrey Those who would give up essential Liberty, to purchase a little temporary Safety, deserve neither Liberty nor Safety. - Benjamin Franklin
Duff Mckagan wrote:
I am learning Shell Programming ..but the book I have is "Unix Shell Programming" and I know there are gonna be some differences, but in this case, Error Redirection is not working as wanted...
Here's the script.
i=a echo `i` 2>> err
Can somebody point out the error? ..if there's any ..lol
Also, I want to install "ksh" on SuSE.
If the reason you want ksh is because your book uses it, I'd recommend that you go and buy a book based on bash instead. bash is much more widely used on Linux, so it's more useful to learn that, IMHO. Cheers, Dave
On 10/16/06, Dave Howorth
Duff Mckagan wrote:
I am learning Shell Programming ..but the book I have is "Unix Shell Programming" and I know there are gonna be some differences, but in this case, Error Redirection is not working as wanted...
Here's the script.
i=a echo `i` 2>> err
Can somebody point out the error? ..if there's any ..lol
Also, I want to install "ksh" on SuSE.
If the reason you want ksh is because your book uses it, I'd recommend that you go and buy a book based on bash instead. bash is much more widely used on Linux, so it's more useful to learn that, IMHO.
Cheers, Dave
No thats not the point...
The book is about 'Unix Shell Programming - Bourne, C and Korn Shells' But most of the commands related to Bourne should work on Bash.(not sure though). Also, they said that the Korn shell is their personal choice..and they believe its the best of all the three...I guess the book is a bit old..They never mentioned the Bash Shell...(cuz its wasn't Borne again :P - Bash - Bourne Again Shell... Its old..but yeah..its helping..:) Can anybody suggest any good author Books for Bash Scripting? -- http://mckagan.googlepages.com
Duff Mckagan wrote:
The book is about 'Unix Shell Programming - Bourne, C and Korn Shells'
But most of the commands related to Bourne should work on Bash.(not sure though).
That's true and also true to some extent about ksh.
Also, they said that the Korn shell is their personal choice..and they believe its the best of all the three...I guess the book is a bit old..They never mentioned the Bash Shell...(cuz its wasn't Borne again :P - Bash - Bourne Again Shell...
There used to be religious wars about sh, csh and ksh. But time has moved on. IMHO, the question is whether you're likely to spend lots of time writing your own scripts from scratch, or whether you're likely to be reading other people's scripts and modifying them. In the first case, you get a free choice of shell language, but in the second case, you're most likely to be working with bash scripts.
Its old..but yeah..its helping..:)
Can anybody suggest any good author Books for Bash Scripting?
The online docs are pretty good: ftp://ftp.cwru.edu/pub/bash/FAQ and especially: http://www.gnu.org/software/bash/manual/bashref.html.gz Check out the indexes at the end :) I haven't used any books about bash, but O'Reilly is usually a good place to start looking: http://promosearch.atomz.com/search/promosearch?query=bash&sp-q=bash&sp-a=sp1000a5a9&sp-f=ISO-8859-1&sp-t=general&sp-x-1=cat&sp-q-1=&sp-x-2=cat2&sp-q-2=&sp-c=25&sp-p=all&sp-k=Articles%7CBooks%7CConferences%7COther%7CWeblogs&c=&p= Perhaps somebody else can suggest a book from personal knowledge? Cheers, Dave
* Dave Howorth
Perhaps somebody else can suggest a book from personal knowledge?
old but good: rute http://rute.2038bug.com/ -- Patrick Shanahan Registered Linux User #207535 http://wahoo.no-ip.org @ http://counter.li.org HOG # US1244711 Photo Album: http://wahoo.no-ip.org/gallery2
On Monday 16 October 2006 17:03, Duff Mckagan wrote:
But most of the commands related to Bourne should work on Bash.(not sure though).
That's true. Bash is "Bourne-compatible".
Also, they said that the Korn shell is their personal choice..and they believe its the best of all the three...I guess the book is a bit old..They never mentioned the Bash Shell...(cuz its wasn't Borne again :P - Bash - Bourne Again Shell...
The older Bourne shell is absolutely miserably compared to bash. Don't use it unless you must... remember COMMAND.COM under DOS 3.x? It's about the same, plus the addition of stream piping and background processes. But no command editing capabilities at all. Of the Unix admins i've known, particularly those who've worked a lot under Solaris, most tend to prefer ksh for two reasons: a) It's installed by default on most Solaris systems, whereas bash is not. b) It's supposedly got some features which are better for shell SCRIPTING (as opposed to interactive use) than bash. Not quite sure what those are, though. At the last company i worked at (a bank using tons of Solaris boxes), 99% of the scripts were written for ksh... and the other 1% were written by me. In the end, i managed to convert several of the admins to bash for interactive shell use, but i never did manage to convert any of them to bash for writing scripts. There was simply too much cultural momentum promoting ksh.
Its old..but yeah..its helping..:)
Ancient.
Can anybody suggest any good author Books for Bash Scripting?
"Learning the Bash Shell", by O'Reilly, is quite good. Old, but still relevant. -- ----- stephan@s11n.net http://s11n.net "...pleasure is a grace and is not obedient to the commands of the will." -- Alan W. Watts
On 10/16/06, stephan beal
On Monday 16 October 2006 17:03, Duff Mckagan wrote:
But most of the commands related to Bourne should work on Bash.(not sure though).
That's true. Bash is "Bourne-compatible".
Also, they said that the Korn shell is their personal choice..and they believe its the best of all the three...I guess the book is a bit old..They never mentioned the Bash Shell...(cuz its wasn't Borne again :P - Bash - Bourne Again Shell...
The older Bourne shell is absolutely miserably compared to bash. Don't use it unless you must... remember COMMAND.COM under DOS 3.x? It's about the same, plus the addition of stream piping and background processes. But no command editing capabilities at all.
Of the Unix admins i've known, particularly those who've worked a lot under Solaris, most tend to prefer ksh for two reasons:
a) It's installed by default on most Solaris systems, whereas bash is not.
b) It's supposedly got some features which are better for shell SCRIPTING (as opposed to interactive use) than bash. Not quite sure what those are, though.
At the last company i worked at (a bank using tons of Solaris boxes), 99% of the scripts were written for ksh... and the other 1% were written by me. In the end, i managed to convert several of the admins to bash for interactive shell use, but i never did manage to convert any of them to bash for writing scripts. There was simply too much cultural momentum promoting ksh.
Its old..but yeah..its helping..:)
Ancient.
Can anybody suggest any good author Books for Bash Scripting?
"Learning the Bash Shell", by O'Reilly, is quite good. Old, but still relevant.
-- ----- stephan@s11n.net http://s11n.net "...pleasure is a grace and is not obedient to the commands of the will." -- Alan W. Watts
Thanks this reply was quite helpful. :) Also, one more li'l doubt: They have a <CR> at the end of almost every command (for execution). For example, $ sh cat <CR> Whats CR? Does it mean -- "Press Enter" ? -- http://mckagan.googlepages.com
* Duff Mckagan
They have a <CR> at the end of almost every command (for execution).
For example,
$ sh cat <CR>
Whats CR? Does it mean -- "Press Enter" ?
Comes from the origin of the computer, the teletype. It means carriage return, or -- "Press Enter". -- Patrick Shanahan Registered Linux User #207535 http://wahoo.no-ip.org @ http://counter.li.org HOG # US1244711 Photo Album: http://wahoo.no-ip.org/gallery2
Teletype was a brand name of printing terminal. The fancier ones, like
the one in my high school (1970) even had a paper tape printer.
================================================
George Falcon, Sr. Systems Engineer, GEICO HQ
Software Distribution Team
================================================
-----Original Message-----
From: Patrick Shanahan [mailto:ptilopteri@gmail.com]
Sent: Monday, October 16, 2006 4:00 PM
To: suse-linux-e@suse.com
Subject: Re: SPAM: [SLE] Can't run this script
* Duff Mckagan
They have a <CR> at the end of almost every command (for execution).
For example,
$ sh cat <CR>
Whats CR? Does it mean -- "Press Enter" ?
Comes from the origin of the computer, the teletype. It means carriage return, or -- "Press Enter". -- Patrick Shanahan Registered Linux User #207535 http://wahoo.no-ip.org @ http://counter.li.org HOG # US1244711 Photo Album: http://wahoo.no-ip.org/gallery2 -- Check the headers for your unsubscription address For additional commands send e-mail to suse-linux-e-help@suse.com Also check the archives at http://lists.suse.com Please read the FAQs: suse-linux-e-faq@suse.com ==================== This email/fax message is for the sole use of the intended recipient(s) and may contain confidential and privileged information. Any unauthorized review, use, disclosure or distribution of this email/fax is prohibited. If you are not the intended recipient, please destroy all paper and electronic copies of the original message.
It doesn't matter, because the term Carriage Return is older than that. It comes from type writers. The carriage is the thing sitting on top of the machine, with the lever you pull to make it go back with a "ping". This is the original Carriage Return. On Mon, 2006-10-16 at 16:50 -0400, Falcon, George wrote:
Teletype was a brand name of printing terminal. The fancier ones, like the one in my high school (1970) even had a paper tape printer.
================================================
George Falcon, Sr. Systems Engineer, GEICO HQ Software Distribution Team
================================================
-----Original Message----- From: Patrick Shanahan [mailto:ptilopteri@gmail.com] Sent: Monday, October 16, 2006 4:00 PM To: suse-linux-e@suse.com Subject: Re: SPAM: [SLE] Can't run this script
* Duff Mckagan
[10-16-06 14:29]: They have a <CR> at the end of almost every command (for execution).
For example,
$ sh cat <CR>
Whats CR? Does it mean -- "Press Enter" ?
Comes from the origin of the computer, the teletype. It means carriage return, or -- "Press Enter". -- Patrick Shanahan Registered Linux User #207535 http://wahoo.no-ip.org @ http://counter.li.org HOG # US1244711 Photo Album: http://wahoo.no-ip.org/gallery2
-- Check the headers for your unsubscription address For additional commands send e-mail to suse-linux-e-help@suse.com Also check the archives at http://lists.suse.com Please read the FAQs: suse-linux-e-faq@suse.com ==================== This email/fax message is for the sole use of the intended recipient(s) and may contain confidential and privileged information. Any unauthorized review, use, disclosure or distribution of this email/fax is prohibited. If you are not the intended recipient, please destroy all paper and electronic copies of the original message.
Anders Johansson wrote:
It doesn't matter, because the term Carriage Return is older than that. It comes from type writers. The carriage is the thing sitting on top of the machine, with the lever you pull to make it go back with a "ping". This is the original Carriage Return.
Actually, that "ping" was the end of line bell, that warned the typist to return the carriage, before hitting the end of the line.
Patrick Shanahan wrote:
* Duff Mckagan
[10-16-06 14:29]: They have a <CR> at the end of almost every command (for execution).
For example,
$ sh cat <CR>
Whats CR? Does it mean -- "Press Enter" ?
Comes from the origin of the computer, the teletype. It means carriage return, or -- "Press Enter".
Actually, it originates from the typewriter, which really had a carriage that returned... -- Until later, Geoffrey Those who would give up essential Liberty, to purchase a little temporary Safety, deserve neither Liberty nor Safety. - Benjamin Franklin
Randall R Schulz wrote:
On Monday 16 October 2006 13:06, Geoffrey wrote:
...
Actually, it originates from the typewriter, which really had a carriage that returned...
To the factory?
Anyone here remember the original "Candid Camera"? There was one gag, where prospective secretaries were given a typing test and the carriage returned right off the typewriter and into the trash can. ;-)
Geoffrey wrote:
Patrick Shanahan wrote:
* Duff Mckagan
[10-16-06 14:29]: They have a <CR> at the end of almost every command (for execution).
For example,
$ sh cat <CR>
Whats CR? Does it mean -- "Press Enter" ?
Comes from the origin of the computer, the teletype. It means carriage return, or -- "Press Enter".
Actually, it originates from the typewriter, which really had a carriage that returned...
As did many teleprinters (Teletype is a registered trademark). For example the Teletype Corp. Model 15 had a carriage much like one on a typewriter.
James Knott wrote:
Geoffrey wrote:
* Duff Mckagan
[10-16-06 14:29]: They have a <CR> at the end of almost every command (for execution).
For example,
$ sh cat <CR>
Whats CR? Does it mean -- "Press Enter" ?
Comes from the origin of the computer, the teletype. It means carriage return, or -- "Press Enter". Actually, it originates from the typewriter, which really had a carriage
Patrick Shanahan wrote: that returned...
As did many teleprinters (Teletype is a registered trademark). For example the Teletype Corp. Model 15 had a carriage much like one on a typewriter.
Still, the typewriter predates teleprinters. -- Until later, Geoffrey Those who would give up essential Liberty, to purchase a little temporary Safety, deserve neither Liberty nor Safety. - Benjamin Franklin
On Monday 16 October 2006 20:27, Duff Mckagan wrote:
Also, one more li'l doubt: They have a <CR> at the end of almost every command (for execution).
For example,
$ sh cat <CR>
Whats CR? Does it mean -- "Press Enter" ?
Yes: CR == Carriage Return. ENTER. -- ----- stephan@s11n.net http://s11n.net "...pleasure is a grace and is not obedient to the commands of the will." -- Alan W. Watts
participants (11)
-
Anders Johansson
-
Carlos E. R.
-
Dave Howorth
-
Duff Mckagan
-
Falcon, George
-
Geoffrey
-
James Knott
-
Justin Piszcz
-
Patrick Shanahan
-
Randall R Schulz
-
stephan beal