How would you print just the 25th line in a file using
smallest shell script?

Answer Posted / guest

head -25 filename | tail -1

Is This Answer Correct ?    14 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How do I run a bin bash script?

580


What are the different types of shell scripting?

540


How many fields are present in a crontab file and what does each field specify?

590


How do I open a jshell in cmd?

602


What is the difference between scripting and coding?

541






Hello all, This is my assignment on shell scripting, can anyone help me regarding this ? Create a shell script which connects to the database In second shell script include the first script for the DB connection Create a table (PRADEEP_DATA) with 2 columns (name, value) In Third shell script include the first script for the DB connection And insert/delete the values from the Table, by accepting input from the user This functionality should be a menu driven Program: 1) Insert to the database a. Name b. value 2)Delete from the database a.Name b.value Exception handling needs to be taken care.

1857


How do I debug a shell script?

570


What are the four fundamental components of every file system on linux?

1168


How to replace following lines, catch (DAOException e) { objLogger.error(this.getClass () + "addUpdateIssues() " + e); throw new BOException(5122); } catch (BOException e) { objLogger.error(this.getClass () + "addUpdateIssues() " + e); throw e; } catch (Exception e) { objLogger.error(this.getClass () + "addUpdateIssues() " + e); throw new BOException(5122); } Needs to be changed in to, catch (DAOException e) { AppException.handleException (null, null, e, null, null, null, "BOException", this.getClass() + "addUpdateIssues() ", null, null, null, null, null, null, null, null, 5122); } catch (BOException e) { AppException.handleException (null, null, null, e, null, null, "BOException", this.getClass() + "addUpdateIssues() ", null, null, null, null, null, null, null, null, 0); } catch (Exception e) { AppException.handleException (null, null, null, null, null, e, "BOException", this.getClass() + "addUpdateIssues() ", null, null, null, null, null, null, null, null, 5122); }

1859


Is powershell a language?

567


How does path variable work?

550


Can we run shell script in windows?

583


What is the use of a shebang line?

625


How to print pid of the current shell?

606


Explain about the exit command?

570