Sponsored Content
Top Forums Shell Programming and Scripting Display a particular line from a file Post 302082077 by Klashxx on Monday 31st of July 2006 06:33:52 AM
Old 07-31-2006
Code:
sed -n "${line_number}p"  $filename

 

9 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Want display a line with space in file by unix script

HI , I am having a file as -----------------a.out------------------- Hi I am unix developer using hp unix this is a test --------------------------------------- i need to read each line by a unix script of the file and to print in console with the space in the line as ... (9 Replies)
Discussion started by: arunkumar_mca
9 Replies

2. Shell Programming and Scripting

Unable to display correctly the contents of a file without a line feed

I am using AIX and ksh. I need to display the contents of a file that has a pid (process id). Because the file is open, it doesn't have the line feed or new line, so for some reason if I do this: `cat $pid` , where $pid is the name of the fully qualified file, it displays test3.sh: 426110:... (1 Reply)
Discussion started by: Gato
1 Replies

3. Shell Programming and Scripting

Display mutiple line in single line

Hi All, I had a file called Input.txt, i need to group up in a single line as 1=ttt and the no of lines may vary bewteen the 1=ttt cat Input.txt 1=ttt,2=xxxxxx, 3=4545 44545, 4=66667 7777, 5=77723 1=ttt, 2=xxxxxx, 3=34436 66 3545, 4=66666, 5=ffffff, 6=uuuuuuu 1=ttt, 2=xxxxxx,... (4 Replies)
Discussion started by: manosubsulo
4 Replies

4. Shell Programming and Scripting

Display 3rd line of a file using cut only

Hello, i want to use new line character in cut command i want to display 3rd line of a file using cut only( not by sed or head -tail command) can anyone suggest me ? Regards (12 Replies)
Discussion started by: Deepak Dutt
12 Replies

5. Shell Programming and Scripting

How to display the line number of file while searching for a pattern

awk 'BEGIN{IGNORECASE=1} /error|warning|exception/ { ++x } END { print x }' filename The above command returning the number of times the pattern present in the file. But I want the the line number as well. please help me out (6 Replies)
Discussion started by: arukuku
6 Replies

6. UNIX for Dummies Questions & Answers

To find and display the middle line in a file using single line command.

Hi all, How can i display the middle line of a file using a single line command? (6 Replies)
Discussion started by: Lakme Pemmaiah
6 Replies

7. Shell Programming and Scripting

Display the file name on each line using awk

How do I display the filename that has been awk to each of the line in Unix, i need to so far I have tried {print FILENAME;nextfile} but to no avail. `awk -F, '/1.2 Install TCP Wrappers/ {P=0} /1.1 Apply latest OS patches/ {P=1} P' solarisappsummary.txt solarisdbsummary.txt` For... (6 Replies)
Discussion started by: alvinoo
6 Replies

8. Shell Programming and Scripting

Search first file line after Error and display

I have a log file which contains information like below (more than 200 ERROR sets). Here I want to find first .c file and function after "ERROR: AddressSanitizer" line. If you see here after "ERROR:" line first file - asfrecohandling.c function - ASFPotRecoHandling_Create_RecPaxSrvcComp ... (6 Replies)
Discussion started by: pushpabuzz
6 Replies

9. Homework & Coursework Questions

How to display certain line of file only using head or tail in 1 command?

First month learning about the Linux terminal and it has been a challenge yet fun so far. We're learning by using a gameshell. I'm trying to display a certain line ( only allowed 1 command ) from a file only using the head or tail. I'm pretty about this answer: head -23 history.txt | tail -1... (1 Reply)
Discussion started by: forzatekk
1 Replies
TKPP(1) 						User Contributed Perl Documentation						   TKPP(1)

NAME
tkpp - frontend to pp written in Perl/Tk. SYNOPSIS
You just have to execute command line : tkpp DESCRIPTION
Tkpp is a GUI frontend to pp, which can turn perl scripts into stand-alone PAR files, perl scripts or executables. You can save command line generated, load and save your Tkpp configuration GUI. Below is a short explanation of tkpp GUI. Menu File -> Save command line When you build or display command line in the Tkpp GUI, you can save the command line in a separated file. This command line can be executed from a terminal. File -> Save configuration You can save your GUI configuration (all options used) to load and execute it next time. File -> Load configuration Load your saved file configuration. All saved options will be set in the GUI. File -> Exit Close Tkpp. Help -> Tkpp documentation Display POD documentation of Tkpp. Help -> pp documentation Display POD documentation of pp. Help -> About Tkpp Display version and authors of Tkpp. Help -> About pp Display version and authors of pp ( pp --version). Tabs GUI There are five tabs in GUI : General Options, Information, Size, Other Options and Output. All tabs contain all options which can be used with pp. All default pp options are kept. You can now set as you want the options. When your have finished, you can display the command line or start building your package. You will have the output tab to see error or verbose messages. NOTES
In Win32 system, the building is executed in a separate process, then the GUI is not frozen. The first time you use Tkpp, it will tell you to install some CPAN modules to use the GUI (like Tk, Tk::ColoredButton...). SEE ALSO
pp, PAR AUTHORS
Tkpp was written by Doug Gruber and rewrite by Djibril Ousmanou. In the event this application breaks, you get both pieces :-) COPYRIGHT
Copyright 2003, 2004, 2005, 2006, 2011 by Doug Gruber <doug(a)dougthug.com>, Audrey Tang <cpan@audreyt.org> and Djibril Ousmanou <djibel(a)cpan.org>. Neither this program nor the associated pp program impose any licensing restrictions on files generated by their execution, in accordance with the 8th article of the Artistic License: "Aggregation of this Package with a commercial distribution is always permitted provided that the use of this Package is embedded; that is, when no overt attempt is made to make this Package's interfaces visible to the end user of the commercial distribution. Such use shall not be construed as a distribution of this Package." Therefore, you are absolutely free to place any license on the resulting executable, as long as the packed 3rd-party libraries are also available under the Artistic License. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See <http://www.perl.com/perl/misc/Artistic.html> perl v5.18.2 2012-07-16 TKPP(1)
All times are GMT -4. The time now is 02:28 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy