Sponsored Content
Top Forums Shell Programming and Scripting Limit of number of lines for awk and sed. Post 302159107 by ghostdog74 on Thursday 17th of January 2008 04:46:17 AM
Old 01-17-2008
you will immediately know when you run your script and see if it finish processing.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

SED: Update Last Line with Number Lines in File

Hi, I have to update last line of a text file with the number of lines in that file. This last line will have text such as 0.0000 and I should replace this with number lines. If lines are 20 then it should be replaced with 00020. Any sed or awk cmd help would be appreciated (3 Replies)
Discussion started by: bmkux
3 Replies

2. Shell Programming and Scripting

Awk number of lines

How do I get the last NR of a csv file? If I use the line awk -F, '{print NR}' csvfile.csv and there are 42 lines, I get: ... 39 40 41 42 How do I extract the last number, which in this case is 42? ---------- Post updated at 11:05 AM ---------- Previous update was at 10:57 AM... (1 Reply)
Discussion started by: locoroco
1 Replies

3. Shell Programming and Scripting

Sed delete certain number of empty lines

Hi What I'm trying to do is delete every blank line upto a certain number, so for instance I only want to delete the first 4 empty lines within a file, I know how to delete every line with: sed '/^$/d' But I can't figure out how to limit it to only the first 4 occourances I though it... (5 Replies)
Discussion started by: duonut
5 Replies

4. Shell Programming and Scripting

Sed/awk to delete single lines that aren't touching other lines

Hello, I'm trying to figure out how to use sed or awk to delete single lines in a file. By single, I mean lines that are not touching any other lines (just one line with white space above and below). Example: one two three four five six seven eight I want it to look like: (6 Replies)
Discussion started by: slimjbe
6 Replies

5. Shell Programming and Scripting

Summing over specific lines and replacing the lines with the sum using sed, awk

Hi friends, This is sed & awk type question. I have a text file which has numbers spread all over the file. I want to sum the series of numbers whenever i find it and produce an output file with the sum. For example ###start of input text file #### abc def ghi 1 2 3 4 kjld random... (3 Replies)
Discussion started by: kaaliakahn
3 Replies

6. Shell Programming and Scripting

Sed print range of lines between line number and pattern

Hi, I have a file as below This is the line one This is the line two <\XMLTAG> This is the line three This is the line four <\XMLTAG> Output of the SED command need to be as below. This is the line one This is the line two <\XMLTAG> Please do the need to needful to... (4 Replies)
Discussion started by: RMN
4 Replies

7. Shell Programming and Scripting

Reading from a file with limit number of lines

Hi, I am trying to pull data from a txt file which has 51 lines Example AK AR AL AZ CA CO CT Now i want to send above data as input to script but i want to run them twice at a time in a nohup like nohup Script_name AK & (3 Replies)
Discussion started by: krux_rap
3 Replies

8. UNIX for Dummies Questions & Answers

Is there a limit in number of lines to be Copy pasted in VI editor ?

In my old shop, we only had AIX machines there (all of version 6.1 ). FTP ports were not open for these AIX machines because of some security thing. So, we can't ftp scripts in ASCII mode. When we wanted to copy huge scripts (shell scripts, sql scripts , ..etc) from our Windows based laptop... (6 Replies)
Discussion started by: kraljic
6 Replies

9. Shell Programming and Scripting

Running sed and counting number of lines processed

/bin/sed -n ';4757335,$ p' | wc -l /bin/sed -n ';4757335,$ p' | egrep "Failed" | egrep -c "PM late arrrival" how can i combine the above two sed commands into one? i want to count the number of lines between the specified line number and the end of the file. AND and i want to count how many... (5 Replies)
Discussion started by: SkySmart
5 Replies

10. Shell Programming and Scripting

Sed/awk command to convert number occurances into date format and club a set of lines

Hi, I have been stuck in this requirement where my file contains the below format. 20150812170500846959990854-25383-8.0.0 "ABC Report" hp96880 "4952" 20150812170501846959990854-25383-8.0.0 End of run 20150812060132846959990854-20495-8.0.0 "XYZ Report" vg76452 "1006962188"... (6 Replies)
Discussion started by: Chinmaya Kabi
6 Replies
ps2frag(1)						      General Commands Manual							ps2frag(1)

NAME
ps2frag - obsolete shell script for the PSfrag system. IMPORTANT NOTICE
The new PSfrag system no longer requires the ps2frag script; instead, it handles the processing entirely within TeX/LaTeX and DVIPS. I'm sure you will agree that never needing to run ps2frag again is a nice convenience! However, there are two significant differences in the way this new version of PSfrag works. Please make yourself aware of them: 1) XDvi is no longer able to determine where your PSfrag replacements should go, so instead it lines them up in a vertical list to the left of the figure. This allows you to confirm that they have been typeset properly, at least. However, to confirm that PSfrag positions your replacements properly, you will have to view the PostScript version of your file with a viewer like GhostView, or print it out. This seems to be the only disadvantage to the elimination of the pre-processing step. 2) If you embed ' ex' commands inside your figures, you now need to explicitly _tell_ PSfrag to process these commands. To do so, use usepackage[scanall]{psfrag} instead of usepackage{psfrag} at the beginning of your LaTeX file. If you only use ' ex' commands in a small number of figures, then a more efficient might be to turn on ' ex'-scanning only for those fig- ures. To do that, add the command 'psfragscanon' immediately before each relevant includegraphics or epsfbox command. NOTES
See the PSfrag documentation for further information. SEE ALSO
dvips(1), gs(1), ghostview(1), latex(1) AUTHORS
psfrag@rascals.stanford.edu The PSfrag maintainer's mailing list. TeXware Feb 95 ps2frag(1)
All times are GMT -4. The time now is 08:05 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy