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 04-04-2011, 06:38 AM   #1
Sam Israel
LQ Newbie
 
Registered: Apr 2011
Location: India
Posts: 1

Rep: Reputation: 0
Hi I am the new child of the linux world..


Hi linux giants and masters , Can any one explain me the difference and working functions between kernel and shell..
 
Old 04-04-2011, 06:53 AM   #2
sycamorex
LQ Veteran
 
Registered: Nov 2005
Location: London
Distribution: Slackware64-current
Posts: 5,819
Blog Entries: 1

Rep: Reputation: 1200Reputation: 1200Reputation: 1200Reputation: 1200Reputation: 1200Reputation: 1200Reputation: 1200Reputation: 1200Reputation: 1200
Hi and welcome to LQ.

Kernel:
http://en.wikipedia.org/wiki/Kernel_(computing)
Shell:
http://en.wikipedia.org/wiki/Shell_(computing)

kernel vs shell:
http://www.allinterview.com/showanswers/65174.html
 
Old 04-04-2011, 07:00 AM   #3
jozelo
LQ Newbie
 
Registered: Sep 2007
Posts: 9

Rep: Reputation: 0
I have this simple awk program but it not prints var_cab whe^E or ^S or ^M after he finds the second ^C

/^C/ { var_cab = substr($0,1,28); ent = 0 ; print "estoy en cabecera" var_cab;}
/^E/ { if ( ent ==0 ) var_fech = substr($0,4,8) ; ent ++;
print var_cab var_fech $0; }
/^S/ { print var_cab var_fech $0; }
/^M/ { print var_cab var_fech $0; }
END { print var_cab,ent}


the input file is many lines like this, every new block stats with ^CAB

CABES3000088888880000007EAMB
ENT20090706D060709-888 0028560000000012VALLE CA'ZULIA5501, 5502, 5498 y 5535
SAL201008250000134900000321V1202935-MU

SAL201011170001361000005245DES3008888777
5577
SAL201011240002224200008601V1202935-MU

SAL201011290001605400016054V1202935-MU

MEN20090701010026108100000020
MEN20090801020026096500000040
MEN20090901030026072900000066
MEN20091001040026044800000101
MEN20091101050025935600000135
CABES300030640069001EBSS
ENT20090324CU-L53-240309 0027839900000021ABSA 133225
SAL201006010004794800021040006,6900V1205439-MU

SAL201007010005631000024981006,5100V1205439-MU

SAL201010010000034400000199006,6800V1205439-MU

MEN20100101110024285000000400
MEN20100201120024211600000410
MEN20100301130024182100000417
MEN20100401140024153100000425
CABES300030640069005EBSS
ENT20080823CU-L50-230808 0026850400000030ABSA 129033
MEN20110101300012104000000942
MEN31/02/2011310012070900000951
CABES300030640069006EBSS
ENT20090120CU-L52-200109 0028987000000019AQUASTREM-G 17NR00000000010618
SAL201005010001311400005219006,4300V1205439-MU

SAL201006010000528300002086006,6900V1205439-MU

SAL201007010009972900046519006,5100V1205439-MU

MEN20100101130025965100000407
MEN20100201140025855500000417
MEN20100301150025775800000425
MEN20100401160025703100000434
MEN20100501170024350700000405
MEN20100601180023624400000455
MEN20100701190012744100000515
MEN20100801200012658400000573
MEN20100901210012522800000641
.... many more lines
 
Old 04-04-2011, 07:27 AM   #4
sycamorex
LQ Veteran
 
Registered: Nov 2005
Location: London
Distribution: Slackware64-current
Posts: 5,819
Blog Entries: 1

Rep: Reputation: 1200Reputation: 1200Reputation: 1200Reputation: 1200Reputation: 1200Reputation: 1200Reputation: 1200Reputation: 1200Reputation: 1200
Quote:
Originally Posted by jozelo View Post
I have this simple awk program but it not prints var_cab whe^E or ^S or ^M after he finds the second ^C

/^C/ { var_cab = substr($0,1,28); ent = 0 ; print "estoy en cabecera" var_cab;}
/^E/ { if ( ent ==0 ) var_fech = substr($0,4,8) ; ent ++;
print var_cab var_fech $0; }
/^S/ { print var_cab var_fech $0; }
/^M/ { print var_cab var_fech $0; }
END { print var_cab,ent}


the input file is many lines like this, every new block stats with ^CAB

CABES3000088888880000007EAMB
ENT20090706D060709-888 0028560000000012VALLE CA'ZULIA5501, 5502, 5498 y 5535
SAL201008250000134900000321V1202935-MU

SAL201011170001361000005245DES3008888777
5577
SAL201011240002224200008601V1202935-MU

SAL201011290001605400016054V1202935-MU

MEN20090701010026108100000020
MEN20090801020026096500000040
MEN20090901030026072900000066
MEN20091001040026044800000101
MEN20091101050025935600000135
CABES300030640069001EBSS
ENT20090324CU-L53-240309 0027839900000021ABSA 133225
SAL201006010004794800021040006,6900V1205439-MU

SAL201007010005631000024981006,5100V1205439-MU

SAL201010010000034400000199006,6800V1205439-MU

MEN20100101110024285000000400
MEN20100201120024211600000410
MEN20100301130024182100000417
MEN20100401140024153100000425
CABES300030640069005EBSS
ENT20080823CU-L50-230808 0026850400000030ABSA 129033
MEN20110101300012104000000942
MEN31/02/2011310012070900000951
CABES300030640069006EBSS
ENT20090120CU-L52-200109 0028987000000019AQUASTREM-G 17NR00000000010618
SAL201005010001311400005219006,4300V1205439-MU

SAL201006010000528300002086006,6900V1205439-MU

SAL201007010009972900046519006,5100V1205439-MU

MEN20100101130025965100000407
MEN20100201140025855500000417
MEN20100301150025775800000425
MEN20100401160025703100000434
MEN20100501170024350700000405
MEN20100601180023624400000455
MEN20100701190012744100000515
MEN20100801200012658400000573
MEN20100901210012522800000641
.... many more lines

Jozelo, please start your own thread. Don't hijack someone else's thread.
 
Old 04-04-2011, 07:55 AM   #5
jozelo
LQ Newbie
 
Registered: Sep 2007
Posts: 9

Rep: Reputation: 0
I am sorry...

I do not know how to start a thread...
 
Old 04-04-2011, 07:59 AM   #6
sycamorex
LQ Veteran
 
Registered: Nov 2005
Location: London
Distribution: Slackware64-current
Posts: 5,819
Blog Entries: 1

Rep: Reputation: 1200Reputation: 1200Reputation: 1200Reputation: 1200Reputation: 1200Reputation: 1200Reputation: 1200Reputation: 1200Reputation: 1200
Quote:
Originally Posted by jozelo View Post
I am sorry...

I do not know how to start a thread...
No problem. If you can click on the "Forums" menu just below LQ logo. It will list all available sections of LQ. Click on the relevant one (probably Linux - Newbie would be best in this case) and click on "New Thread" button.
 
  


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
Difference between Child THREAD and Child PROCESS whho Linux - Newbie 12 02-16-2015 01:22 AM
World of warcraft for Linux.(This is a forum for people who want world of warcraft..) darkstarbyte Linux - Games 17 09-05-2011 03:30 AM
LXer: One Laptop Per Child Doesn't Change the World LXer Syndicated Linux News 1 12-05-2007 01:37 PM
How to kill a Child and all its subsequent child process in C shayer009 Programming 3 12-04-2007 01:40 AM
Killing a child process from another child marri Programming 6 10-01-2004 08:08 PM


All times are GMT -5. The time now is 06:23 AM.

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