Sponsored Content
Top Forums Shell Programming and Scripting CLEAR THESE Doubts Please ( bash scripts ) Post 302878988 by venkatesh B on Tuesday 10th of December 2013 03:30:49 AM
Old 12-10-2013
Lightbulb CLEAR THESE Doubts Please ( bash scripts )

gnu.txt-----example file name

1. Display the 15th line of gnu.txt.

2. Display all lines of gnu.txt where the first and third fields are the same.

3. Display all lines of gnu.txt that have more than 100 fields.

4. Display the total number of lines in gnu.txt.

5. Display all lines in gnu.txt containing the character string "DAMAGES".

6. Display all lines in gnu.txt whose 5th word is "a".

7. Display all lines in gnu.txt whose last field contains at least one uppercase letter.

8. Display all lines in gnu.txt whose last field begins with a lowercase letter.

9. Display all lines in gnu.txt that contain either the word "conditions" or the word "WARRANTY".

10. Display the last line of file gnu.txt.

11. Display the total number of fields in gnu.txt.

12. Display the total number of characters in gnu.txt.

13. Display the total number of lines in gnu.txt containing the string "permissions". Note: Not the number times the word itself appears.


14. Display the line in gnu.txt with the largest number of fields.

15. Display the next to last field of each line of gnu.txt.
 

9 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

plz clear my doubts

hi I am new to unix.I have searched some forums but couldnt get my answer. i have created 6 processes and i want to write the process ids into a file which can be read in another program i am writing.Can someone plz send me the syntax for doing so. I have a doubt regarding pipes.If a... (3 Replies)
Discussion started by: soumya_v7
3 Replies

2. Shell Programming and Scripting

Nonblocking I/O in bash scripts

Hello, Is there a way to perform nonblocking I/O reads from standard input in a bash script? For example, in C, you can say: int flags = fcntl(STDIN_FILENO, F_GETFL); fcntl(STDIN_FILENO, F_SETFL, flags | O_NONBLOCK); ch = fgetc(stdin); the 'fgetc' function will not block on... (5 Replies)
Discussion started by: neked
5 Replies

3. Shell Programming and Scripting

GUI for bash scripts?

Hello everyone! I'm looking for a way to build a GUI for various bash scripts I've written. Is there any "good" way to do it? I've heard about python/gtk+,qt and other stuff, but I've absolutely no idea where I should look at. Thanks a lot in advance! Regards, xenator EDIT: ... (1 Reply)
Discussion started by: xenator
1 Replies

4. Shell Programming and Scripting

Changing the Bash Scripts to Bourne Scripts:URGENT

Hi, I have to write a program to compute the checksums of files ./script.sh I wrote the program using bash and it took me forever since I am a beginner but it works very well. I'm getting so close to the deadline and I realised today that actually I have to use normal Bourne shell... (3 Replies)
Discussion started by: pgarg1989
3 Replies

5. Shell Programming and Scripting

Clear Screen Command for BASH shell

I am unable to use clear or cls command on bash shell. I have recently installed Cygwin and am using that for practicing unix commands. I see that I can use Ctrl + L to clear the screen. I created an alias in my .bashrc to do the same as alias cls='^L' This is how i defined other aliases ... (4 Replies)
Discussion started by: erora
4 Replies

6. Shell Programming and Scripting

Bash scripts as commands

Hello, the bulk of my work is run by scripts. An example is as such: #!/bin/bash awk '{print first line}' Input.in > Intermediate.ter awk '{print second line}' Input.in > Intermediate_2.ter command Intermediate.ter Intermediate_2.ter > Output.out It works the way I want it to, but it's not... (1 Reply)
Discussion started by: Leo_Boon
1 Replies

7. Shell Programming and Scripting

Bash interactive scripts

i have a script that contains: script.sh #!/bin/bash echo -e "\t\t\t0. Exit" echo -e "\t\t\t1. Help" echo -e "\t\t\t2. Notes" echo -e "\t\t\t3. Classes" echo "${newline}" echo -n -e "\t Please enter option number : " read Type case $Type in 1) clear ... (1 Reply)
Discussion started by: SkySmart
1 Replies

8. Shell Programming and Scripting

Merge two bash scripts

I am currently running the following two bash scripts, in order to start x, matchbox and midori on the raspberry pi hdmi, using a remote ssh session. start-browser #!/bin/bash # import variables source /var/rpi/scripts/config/variables/general echo "starting browser" DISPLAY=:0.0 sudo xinit... (2 Replies)
Discussion started by: aristosv
2 Replies

9. Shell Programming and Scripting

Bash -c interactive scripts

i have to run the following script through a pipe: script.sh: #!/bin/bash echo "Hello World" echo -e "The \033 here's how its currently being run: bash -c "$(cat script.sh)" This is an interactive script. the problem is, when i run it this way, if you go to another terminal and... (4 Replies)
Discussion started by: SkySmart
4 Replies
RDF::Closure::Engine::Core(3pm) 			User Contributed Perl Documentation			   RDF::Closure::Engine::Core(3pm)

NAME
RDF::Closure::Engine::Core - common code used by inference engines ANALOGOUS PYTHON
RDFClosure/Closure.py DESCRIPTION
This is a basic forward-chaining engine. Inference engines don't have to inherit from this, but it helps. SEE ALSO
RDF::Closure::Engine. <http://www.perlrdf.org/>. AUTHOR
Toby Inkster <tobyink@cpan.org>. COPYRIGHT
Copyright 2008-2011 Ivan Herman Copyright 2011-2012 Toby Inkster This library is free software; you can redistribute it and/or modify it under any of the following licences: o The Artistic License 1.0 <http://www.perlfoundation.org/artistic_license_1_0>. o The GNU General Public License Version 1 http://www.gnu.org/licenses/old-licenses/gpl-1.0.txt <http://www.gnu.org/licenses/old- licenses/gpl-1.0.txt>, or (at your option) any later version. o The W3C Software Notice and License http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231 <http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231>. o The Clarified Artistic License <http://www.ncftp.com/ncftp/doc/LICENSE.txt>. DISCLAIMER OF WARRANTIES
THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. perl v5.14.2 2012-06-28 RDF::Closure::Engine::Core(3pm)
All times are GMT -4. The time now is 05:27 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy