Computing.Net > Forums > Unix > Search Results

Quick Links

Computing.Net Solution Center
Desktop Access to Search
Ask a New Question

Sponsored Results for: Print previous line

Ads by Google


Show Within: One Month | One Year | Forever
Search Results for: Print previous line

Product Search Results


Results 1 - 25 of 2890

[higher confidence] - higher confidence, [lower confidence] - lower confidence

Print previous line
    Summary: How I can search file and if word match, script will print that line and, for example, five previous line. (awk or other) 1 2 3 4 5 6 7 8 9 Match then...

Reading previous line
    Summary: Hello, Currently am positioning at the 100th line with the AWK. How can I read & print its previous line#99th. Your reply is greatly appreciated. Than...

grep - print next line too
    Summary: Hi Guru's, I would like to grep a particular string in a file and the output should print the line containing the grep'd string and next line also. Ca...

Print certain line from a text file
    Summary: Hi all, I have a text file and I want to clean up the file by only print those lines start with the date. Is there anyway I can do that? Code: [?...

script which prints certain lines
    Summary: hello friends! Can anyone advise me how I could script a command that: reads a file, prints 5 lines, then skips 5 lines and then repeats this process...

printing a line thru a loop
    Summary: hi, i need to print n lines of the file one ater another. my script is something like this i=1 while [i=n] do x=`sed -n $ip path.txt` echo $x #i will ...

printing all lines after grep using awk
    Summary: To print the line with the search_pattern and all lines there after: /sbin/chkconfig --list | awk '/xinetd based services/ {f=1}f' ...

print the next line
    Summary: Hi All, How can I find a word and print that line and the next line as well? I know this: awk '{if ($2=="words") {print ab,"\n",$0} {ab=$0}}' file.txt...

if no comma found end of line print
    Summary: I have this file w/ lot of inputs. now at the end of each input there has to be a "comma". if comma is not there program will ingore that input. so i ...

print lines from file
    Summary: Hi, I am new to shell programming and I need your help. I just learn that I can use the sed comand to print certain lines of an input file. e.g. sed ...

Find a string; print next line
    Summary: Thanks Nails. Here's the approach I took; see if you can add more sanity to my hacking: -- Since the first target line always ends with "frame:" (a...

Unix-sed- need help
    Summary: Jern, I used awk because it is much more appropriate for a task such as this. At startup, the BEGIN statement sets the Output Field Separator to the t...

Small sed bug - line below
    Summary: Albert, you need to omit the -n option, which suppresses the default printing of lines. This will allow all lines (modified or not) to be printed. Th...

compare lines within file
    Summary: Jerry's solution prints each line containing 2 words. To determine how many unique dates your file contains (keying on word1 in each line), you can is...

grep to find a specific line number
    Summary: I am attempting to find a particualr line in a file and then replace it. Unfortunatly i can only guaruntee the content of the line prior to the one i...

script to remove some lines in all
    Summary: Sorry - I think maybe I missed a step in the explanation of what the command is doing. In it's original form the command will read in the lines from t...

Selective AWK printing
    Summary: Hello, What is the awk command that will print the 5th line above an expression I tell it to find? Example file: AAB 1 AAB 2 AAB 3 AAB 4 AAB 5 REPORT ...

Negate a Regular Expression?
    Summary: For grep, the -v option will negate (or reverse) the result set. grep red grep -v red grep -e red -e blue -e pink grep -ve red -e blue -e pink sed can...

Substituting on the line above the match
    Summary: sed does have hold buffers that can be utilized, but it might be quite difficult to do with sed without BEGIN/END cycles like awk. The following awk s...

sed & awk question
    Summary: In both of the scripts below, to prevent from losing my indentation, I use leading underscores instead of leading spaces, so you would need to change ...

Parsing patterns
    Summary: (more info from previous message) REVISED SCRIPT: print "starting script ....." while read LINE; do print "Reading line $LINE" CHOICES=$(echo "$LINE" ...

removing specific line from file
    Summary: If you include a variable, the sed command needs to be surrounded with double, not single quotes HOME=/usr/home/bob sed -e "s/${HOME}/replacement_stri...

display the line and its neighborin
    Summary: grep has three options: -A n , -B n and -C n meaning to print n lines after, before or both respectively. ...

Line Extraction from Script
    Summary: To print each line that follows lines that begin with COUNT: sed -n '/^COUNT/{n;p;}' myfile ...

Last Line
    Summary: I want to print last line of list of files using awk command. tail -1 file will give last line of only 1 file. I want last of line of many files. Thn...

Jump To: 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | >>

Sponsored Results for: Print previous line

Ads by Google