LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 06-01-2013, 02:54 PM   #16
pietmomberg
LQ Newbie
 
Registered: May 2013
Location: Denmark
Posts: 8

Original Poster
Rep: Reputation: Disabled

Hi all,
It works perfectly, thanks for the help

Sincerely, Piet
 
Old 06-02-2013, 04:35 AM   #17
pietmomberg
LQ Newbie
 
Registered: May 2013
Location: Denmark
Posts: 8

Original Poster
Rep: Reputation: Disabled
Hi all,
It works perfectly, thanks for the help

Sincerely, Piet
 
Old 06-02-2013, 06:08 AM   #18
David the H.
Bash Guru
 
Registered: Jun 2004
Location: Osaka, Japan
Distribution: Debian sid + kde 3.5 & 4.4
Posts: 6,823

Rep: Reputation: 1958Reputation: 1958Reputation: 1958Reputation: 1958Reputation: 1958Reputation: 1958Reputation: 1958Reputation: 1958Reputation: 1958Reputation: 1958Reputation: 1958
Harumph. I had suspected DOS line endings. I should've mentioned the possibility in my last post.

And just to clarify:

As I said before, /bin/sh is the posix-defined system shell. In the early days this was pretty much synonymous with the original bourne shell, but these days its functions are usually supplied by another shell, bash, dash, ksh, among others.

But be aware that, even if another shell is used for sh, the script will be interpreted strictly according to posix standards. This can sometimes have confusing effects. Code that is written according to the standard will run correctly, code that conflicts with it will cause it to error out, and code that is undefined by the standard may either run or not, according to whether the shell used supports that specific feature.

Arrays are a common example. They are not part of posix, and if you use them in a /bin/sh script, they will work if the underlying shell is bash or ksh, but will fail if it's dash, since that shell doesn't support arrays.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
copy file and rename n times in succession coryjsanders Linux - Newbie 2 12-08-2012 12:06 AM
Shell script to get name of file, delete original file, rename blank file chrisgti Linux - General 11 09-15-2012 02:49 AM
Get first file of directory then copy to other directory andd rename the file Faye Linux - Software 4 01-30-2011 09:16 AM
can't find zm script file to copy. Buddhike G Linux - Software 1 10-08-2007 05:17 PM
how to rename a file and copy a file in a shell zach014 Linux - Newbie 6 11-23-2006 09:23 AM


All times are GMT -5. The time now is 03:29 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration