Programming :: Difference Between /bin/bash And /bin/sh?

Dec 27, 2008

I know it's a very silly question but could someone please explain the difference between "/bin/bash" & "/bin/sh" I was under the impression that both are same but following output on my Ubuntu 8.10 is making me raise my eyebrows.

Quote:

parag@station3:~$ ls -l /bin/bash ; ls -l /bin/sh
-rwxr-xr-x 1 root root 725136 2008-05-13 00:18 /bin/bash
lrwxrwxrwx 1 root root 4 2008-12-03 21:42 /bin/sh -> dash
parag@station3:~$

View 11 Replies


ADVERTISEMENT

Programming :: Difference Between Shell And Bash Scripts?

Sep 25, 2010

Whats the difference, and when do you use which?

View 2 Replies View Related

Programming :: Difference Between Formats In BASH Shell

Apr 30, 2009

I searched around but I can't get a good handle on the difference between the following formats in BASH shell.

$VAR
$(VAR)
$((VAR))
$($VAR)
$(($VAR))

Can someone explain it, or point to a clear, concise document explaining it?

View 3 Replies View Related

Programming :: Bash: Functional Difference Between Process Substitution And Here String With $( )

Mar 14, 2010

Further to solved LQ thread Bash: how to populate a list of arbitrarily named files?, what is the functional difference between feeding a loop with process substitution and feeding it with a here string with embedded command substitution? ABSG pages: process substitution, here string and command substitution. This works

Code:

while IFS= read -r -d '' file
do
files+=("$file")
done < <(find $dir -type f -print0)

[code]....

View 2 Replies View Related

General :: Difference Between &> And >& In Bash?

Sep 14, 2011

What is the difference between &> and >& in bash? tldp did not mention the latter one. Is it really a redirection operator?

View 3 Replies View Related

General :: Difference Between Ksh And Bash?

Feb 24, 2010

What are significant differences between ksh and bash? I read somewhere that ksh is proprietary shell and bash is completely open source.

View 11 Replies View Related

Programming :: 3D Programming - Difference Between JOGL And C++ OpenGL Programming?

Aug 27, 2010

I am interested in learning 3D programming. The thing is, I would hate to put too much effort to learn something that doesn't have future and is dying. My favorite language at the time is Java. My goal is professional programming.

So I have several questions:
1. Should I learn JOGL or start learning C++ and do C++ openGL programming?
2. Is there a big difference between JOGL and C++ openGL programming?
3. Is it worth to learn openGL? Does it have a future?
4. Is it a big difference between openGL and directX coding?
5. If choosing Java, then JOGL or LWJGL?

Why and what is the main difference between them?

View 4 Replies View Related

Programming :: Bash: Printing The Line Number In Bash Script?

Feb 4, 2011

I would like to know how do I print the line # in a script. My requirement is, I have a script which is about ~5000 lines long. If there are any errors happen I just exit. And I would like to add the line # of the script where the error happened.

View 3 Replies View Related

Programming :: Bash Ctrl+c Tarp And Bash Read With Timeout?

Jan 24, 2010

simple bash code:

Code:
#!/bin/bash
trap "echo 'you got me'" SIGINT SIGTERM # to trap ctrl+c
echo "Press ctrl+c during 5 sec loop"
for ((i=0;i<5;i++)); do

[Code]...

How come code behaves normally and stops when ctrl+c signal is caught and resumes, but after I use at least one timeout read in the code it looks like, if signal is caught again it doesn't pause the execution but skips the loop. If you remove -t (timeout) option from the read, both loops look the same!

View 10 Replies View Related

Programming :: Reading A Bash Variable In Bash Scripting ?

Nov 26, 2008

I have a config file that contains:

my.config:

Code:

Now in my bash script, I want to get the output /home/user instead of $HOME once read. So far, I have managed to get the $HOME variable but I can't get it to echo the variable. All I get is the output $HOME.

Here is my parse_cmd script:

Code:

View 3 Replies View Related

Programming :: Run Multiple Bash And Php Scripts From A Bash Script?

Jul 25, 2011

I have written quite a few separate bash & scripts and php scripts that up to now I have run from cron jobs. However I have to estimate how long each takes to run, before running the next and so it probably takes much longer than necessary to run them all. They have to run in order.

Now there are so many I am thinking it would be better to have a master bash script that would run one after the other, but I am not sure how to get the master script to wait before starting to run the next script. Is this possible and is there a command that will make the script wait between bash and php scripts , for them to finish, before running the next?

View 5 Replies View Related

Programming :: Bash: Get Filename And Extension Using Bash?

Jan 9, 2010

I would like to get the filename (without extension) and the extension separately. The best solution I found so far is:

Let FILE="thefilenameofsomefilesfor_instance.txt"

Code:

NAME=`echo "$FILE" | cut -d'.' -f1`
EXTENSION=`echo "$FILE" | cut -d'.' -f2`

I think it would be better to count the len and remove 3 chars to right to get the extension, but it can be macintosh filenames with have 4 chars for extensions.

View 5 Replies View Related

Programming :: Difference Between Two Packages Of JDK

May 3, 2010

Ubuntu 10.04 lucid. sun-java6-jdk has been dropped from the Multiverse section of the Ubuntu archive. They recommend using openjdk-6 instead. Is there any difference between these 2 packages?

View 3 Replies View Related

Programming :: Difference In SSH And Solaris?

Nov 1, 2010

I would like know know difference in ssh comman in solaris and linux, are they both same?

View 2 Replies View Related

Programming :: Defining Functions - What Is The Difference?

Aug 12, 2010

But what is the difference between this...

Code:
my_fucnction () {
echo "Hello World"
}
Code:
function my_fucnction {

[Code]...

View 10 Replies View Related

Programming :: Difference Between Hexdump And Objdump?

Aug 15, 2010

I am not clear with difference between hexdump and objdump and coredump. I wrote a small program

Code:
main (){
int a=2;
int b=4;
int k=b/a;
int m=9;

[Code].....

Some of the above instructions such as 89 d0 should be present in hexdump. What exactly is the hexdump ,objdump and coredump and what is their importance?

View 1 Replies View Related

Programming :: Difference Between Struct And Union?

Nov 6, 2010

I have been spending time (starting yesterday) reverse-engineering GTK+ to get my programming skills up. I came across a struct in the headers (_GtkArg, which was then typedeffed into GtkArg) that includes a union in it that has pretty much the same properties as a struct. Then, there was a struct inside the union.

I'm confused. Just what is the difference between a union and a struct?

P.S. I am using GTK's native C programming language.

View 8 Replies View Related

Programming :: Difference Between Setup_irq And Request_irq?

Feb 1, 2011

difference between setup_irq and request_irq and if there is a difference is there a way to use request_irq instead of setup_irq in this module?

[URL]

View 7 Replies View Related

Programming :: Difference Between Two Arithmetic Pointers

Jun 1, 2010

What is the difference between *ptr++ and (*ptr)++. In my opinion the terminology is all over the place so if you could give an example it would be better.

View 8 Replies View Related

Programming :: Difference Between Various Symbols Of Kernel

Aug 22, 2010

I was going through some exercise given in my school. I have read the C book but I am not able to understand some part. That is static variable. What exactly is a static variable and what does it do? I saw in Linux Kernel Programming external and exported are also some thing. I am not getting the difference between static,EXPORT_SYMBOL,external variable types. If I make a kernel module then how will I make sure that my variable is visible to the kernel. Is this what it is all talking about? I have checked this page [URL].

View 2 Replies View Related

Programming :: Difference Between PHP Echo() And Print()?

Dec 1, 2010

What's the difference between PHP echo() and PHP print(), especially in the execution time?

View 6 Replies View Related

Programming :: Difference Between Two Find Commands?

Dec 27, 2009

Code:

find . -name *.txt

Code:

find . -name *.txt

View 10 Replies View Related

Programming :: Difference Between Xlib And OpenGL?

Dec 6, 2008

I am starting to learn Linux graphical programming. Most of codes in my hands were written based on xlib, which is a kind of old graphic lib. I see some developers more interested in openGL. Then what's the difference between xlib and openGL? And which one is more popular used in which industry area?

View 2 Replies View Related

Programming :: __init() And Module_init() - What's The Difference

May 16, 2011

__init() and module_init() - What's the difference

View 3 Replies View Related

Programming :: Performance Difference Between 32bit And 64bit

Apr 10, 2010

Now, I'm ready to run my program, and my code is based on 32bit version. So I run the program on Ubuntu 9.10 32bit. And I got running time for 48s. But that's a bit slower than I expected; the program has bunch of File I/O processing but the result(48s) just doesn't make sense compared to given initial data set. So I just run the same program and same initial data set on Ubuntu 9.10 64bit ver. Then, bang!! it took 1.4s to finish the job.

Do you have any thoughts what kind of fact might make this significant difference? The differences b/w those two OS are "32 vs 64" and 32bit version has Java SDK, Eclipse, Apache2, Mysql, PHP, CGI, and python. We-server service is running but because I'm not really running web server. Did the result come from these background programs?

-- I tested it on the both OS in the same situation as possible as I can.
(reboot->test)

-- BTW 64bit one doesn't have those programs. I just installed on my external hard drive, so it's literary PURE one. (32bit one also in the same HDD)

-- I run these Ubuntus on VMware

View 3 Replies View Related

General :: Difference In C Programming In Gedit & Turbo C?

Sep 6, 2010

In our college all the systems (running on windows xp) have TURBO C/C++ installed on them which we use for C programming. I recently installed ubuntu 10.04 on me laptop (DELL Inspiron 14R (N4010) with some modifications) i read somewhere on the internet that Gedit can be used for writing a programme in ubuntu which can be compiled using gcc. Well if i use Gedit rather than Turbo c will i experience any differnce?, i mean is there any problem in doing so?? Or i should prefer running turbo c using DOS BOX?

View 7 Replies View Related

Programming :: Difference In Time Recorded By Clock_gettime() And TSC?

Jan 24, 2011

I want to measure the time it takes to execute a C function. The question is which is the best method to record time. After a lot of searching online, I found two ways [URL]:

a. using clock_gettime(CLOCK_MONOTONIC, &t)
b. using TSC

I call the C function 50 times (recording the time it takes for each call). The average is found only for the last 35 calls.

Using (a), I get:

48345 us
28350 us
28379 us
27716 us

[code]....

Average time for the last 35 loops: 121450.47 microseconds

Using (b), I get:

48130 cycles
28726 cycles
28820 cycles
27421 cycles

[code]....

Average for the last 35 loops: 27236.66 cycles What could be causing the strange value of 3322259 us in method (a)? I could just use method (b) but I would like to know what is going on here... Btw, I am using a desktop - with Linux debian 2.6.26 #1 SMP.

View 7 Replies View Related

Programming :: Difference Between Init And Main Function In A Process

Jul 12, 2010

I have a project in which many processes run. p1,p2,p3.

->There are some .so files are included in some process when needed example ppp.so in process p1 (when ppp is needed and will go like a plugin) but it has a init () function how a process includes a init() function ?

->process p1 has main function i.e main()

->so evry process has main() right ?

what is the difference between init () and main () functoins. where is init () used and how many init() a process van have ?

View 3 Replies View Related

Programming :: Difference Between Message Queues And Named Pipes

Mar 1, 2011

recently I had been to interview where I had a question to be answered, that what are advantages and disadvantages when desiging an application in linux.

View 1 Replies View Related

Programming :: Bash Programming - Rename Files In A Loop?

Mar 31, 2011

I need to rename the resulted searched files from a loopI have the following code:

find . -name DOC* | while read i
do
find $i -type f -name '*.txt'
done

basically, I am searching for all txt files inside any folder starting with DOC name.this code is working fine with me.I need to rename those .txt files to .txtOLDOS: Ubuntu 10.4Bash shell

View 10 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved