Jump to content

Shell script vasthey help pls


mastercheif

Recommended Posts

4 minutes ago, mastercheif said:

sh odi_script.sh Audit_Execution.sql testload  | head -n 2 | tail -n 1 
 

pai command lo aa bold part yenti man ?

Number of lines in a file man

head -n 2 antey, first 2 lines

same for tail

 

google chesey antha opika kuda leda man

Link to comment
Share on other sites

5 minutes ago, mastercheif said:

sh odi_script.sh Audit_Execution.sql testload  | head -n 2 | tail -n 1 
 

pai command lo aa bold part yenti man ?

bro aa 3 files lo first 2 lines and last 1 line display chesadhi anukunta...

unix commands vaadi 5 yrs ayipoyindhi

 

Link to comment
Share on other sites

2 minutes ago, k2s said:

Number of lines in a file man

head -n 2 antey, first 2 lines

same for tail

 

google chesey antha opika kuda leda man

kopadaku thatha... manam manam friends kada.

 

it's executing a script with two params daani taruvatha aa head tail undhi. 

Link to comment
Share on other sites

3 minutes ago, Naaperushiva said:

bro aa 3 files lo first 2 lines and last 1 line display chesadhi anukunta...

unix commands vaadi 5 yrs ayipoyindhi

 

kaadu tammudu .. it's executing a script with two params daani taruvatha aa head tail undhi. 

Link to comment
Share on other sites

3 minutes ago, mastercheif said:

kaadu tammudu .. it's executing a script with two params daani taruvatha aa head tail undhi. 

ok ok....but aa head and tail commands dhaanike.... head default gaa first 10 lines display chesthadi...tail kooda same but last 10 default gaa choopisthadhi

Link to comment
Share on other sites

7 minutes ago, mastercheif said:

kopadaku thatha... manam manam friends kada.

 

it's executing a script with two params daani taruvatha aa head tail undhi. 

Sh - use shell to execute ani

Odi___.sh- is main shell script, which take some cmd line arguments. Next .sql and some string are those cmd line arguments.. 

aa script execute ayina tarvata vachina result lo first 2 lines and last 1 line nee mohana kottu ani dani meaning

Link to comment
Share on other sites

7 minutes ago, k2s said:

Sh - use shell to execute ani

Odi___.sh- is main shell script, which take some cmd line arguments. Next .sql and some string are those cmd line arguments.. 

aa script execute ayina tarvata vachina result lo first 2 lines and last 1 line nee mohana kottu ani dani meaning

Exactly...nuvvu super thatha

Link to comment
Share on other sites

38 minutes ago, mastercheif said:

sh odi_script.sh Audit_Execution.sql testload  | head -n 2 | tail -n 1 
 

pai command lo aa bold part yenti man ?

| ..dinni pipe antaru man..

Use entante pipe mundu unna command yokka output ni pipe tarvata command ki input ga istunnav ..

Head -n 2 ante print only first 2 lines from the output ani..

Tail -n 1 print last 1 line from the output ani..

So..head -n 2| tail -n 1 niku 2nd line from your. Sh script output ni print chestadi..

 

Link to comment
Share on other sites

43 minutes ago, k2s said:

Sh - use shell to execute ani

Odi___.sh- is main shell script, which take some cmd line arguments. Next .sql and some string are those cmd line arguments.. 

aa script execute ayina tarvata vachina result lo first 2 lines and last 1 line nee mohana kottu ani dani meaning

Thatha gariki dhanyavadanamulu 

Link to comment
Share on other sites

14 hours ago, mastercheif said:

sh odi_script.sh Audit_Execution.sql testload  | head -n 2 | tail -n 1 
 

pai command lo aa bold part yenti man ?

Script run chesinappudu vachina output lo first 2 lines and then daanilo last 1 line. So technically script output lo 2nd line printing 

Link to comment
Share on other sites

3 minutes ago, reddyeee said:

Script run chesinappudu vachina output lo first 2 lines and then daanilo last 1 line. So technically script output lo 2nd line printing 

Accurate answer... 

Link to comment
Share on other sites

Just now, andhrafan85 said:

Its sending first 2 lines in .sql file and last line from testload to the shell script as input parameters

wrong broder... 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...