Sponsored Content
Top Forums Shell Programming and Scripting Trouble getting the next to last record with awk Post 302393645 by Franklin52 on Tuesday 9th of February 2010 09:39:41 AM
Old 02-09-2010
The code of malcomex999 gives one line before every line with " ----- Traitement termine ----- ".

Isn't that what you want?
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Trouble with awk

This is probably a fairly simple question but I cant seem to get it to work. Im trying to multiply an entire column in a file by a variable in my bash script but just cant seem to get it to work with awk. Here is what I'm trying $varr is some value $line is my file awk '{print... (1 Reply)
Discussion started by: RichieFondel
1 Replies

2. Shell Programming and Scripting

having trouble with using if clause in AWK

The goal: I have a list of people in teams. The list looks something like this $1 = Job Position (marketing, IT, PR) $2 = Name $3 = Team Name $4 = Targeted member (somebody in field 2 targets somebody else) $5 = Employment Status (full time/part time/etc) The idea is to search through... (2 Replies)
Discussion started by: MaestroRage
2 Replies

3. Shell Programming and Scripting

Trouble with Awk

Hi all, I'm writing a program in bourne shell that compresses a file 3 different ways then displays a table of data with the compression type, original file size, compressed size and compression ratio. I've written most of it but reached 2 problems that won't allow me to finish it correctly. The... (2 Replies)
Discussion started by: javajynx
2 Replies

4. UNIX for Dummies Questions & Answers

trouble with awk

I am trying to figure awk. I have a file in my home directory called testawk.sh, have made it executable, and have run it... But don't see any output. This is the contents of the file: #!/usr/bin/awk -f { print " - HI -" }I enter ./testawk.sh in the prompt, press enter, and watch as the... (2 Replies)
Discussion started by: matthewden
2 Replies

5. UNIX for Dummies Questions & Answers

Trouble Assigning AWK variables

Hi, I made an executable file in terminal and it looks like this. echo Enter the name of the file without the .wig extension read NAME echo Enter the ratio read RATIO awk '{$2*=$RATIO;{print $0}}' ${NAME}.wig > ${NAME}normalized.wig I have a file with several million lines that look... (6 Replies)
Discussion started by: wyarosh
6 Replies

6. Shell Programming and Scripting

How to compare current record,with next and previous record in awk without using array?

Hi! all can any one tell me how to compare current record of column with next and previous record in awk without using array my case is like this input.txt 0 32 1 26 2 27 3 34 4 26 5 25 6 24 9 23 0 32 1 28 2 15 3 26 4 24 (7 Replies)
Discussion started by: Dona Clara
7 Replies

7. Shell Programming and Scripting

Trouble using awk and sed commands

Hi i have a control file which i need to read. It is ',' separated. the 3rd parameter will be ';' separated. I have 2 files: /home/orig.txt /home/join.txt I need a O/P file name based on firstparameter_1.txt and it should have the content of /home/orig.txt and appended content from... (2 Replies)
Discussion started by: Ravindra Swan
2 Replies

8. Shell Programming and Scripting

Trouble with awk command

Hi, I need to read a string with ; separated using loop one filed by one field and perform some operation. Can you please check and let me know how to print command parameterised. key=phani;ravi;kiran number_of_keys=`echo $key|awk '{print NF}' FS=';'` for (( i = 1; i <= $number_of_keys;... (4 Replies)
Discussion started by: Ravindra Swan
4 Replies

9. Shell Programming and Scripting

Trouble using awk command

Hi, I have 2 .txt pads containing data. I need a script which reads content of one .txt file, performs some operations and calculates a number which is stored in a variable. Now , all the content of another .txt pad should be appended to first .txt pad at pre calculated nth line number. ... (4 Replies)
Discussion started by: Ravindra Swan
4 Replies

10. UNIX for Advanced & Expert Users

awk trouble inside another command

I tried running this. dsh -w server1 'lsof /audit | awk '{ print $2 }'' It did not like above so I tried to escape the single parenthesis at the end. dsh -w server1 'lsof /audit | awk '{ print $2 }\'' It then hung so I changed up the parenthesis to this. This worked. dsh -w server1... (6 Replies)
Discussion started by: cokedude
6 Replies
HTMAKE(1)						       GLOBAL cgi Utilities							 HTMAKE(1)

NAME
htmake - create GLOBAL hypertext source searchable by gsearch.cgi SYNOPSIS
htmake [htags options] [--url=base-url] [destdir] DESCRIPTION
htmake is a wrapper script that creates searchable hypertext from program source code and records information into a path database needed for a centralised search mechanism. Prior to using this command you must have installed gsearch.cgi using the htconfig -I option and configured the location of the path data- base in htmake.conf Before you can create the hypertext source you need to execute gtags(1) from the root directory of the source tree. htmake is then called from the same place. htmake uses htags(1) to create the hypertext with a unique id and htconfig(1) to make the required entries in the path database. OPTIONS
The following options will be passed to htags(1) if used. -a Make an alphabetical function index. -c Compress html. Use gzip(1) with .ghtml suffix. -C Compress html. Use gzip(1) with .html.gz suffix. -d tagdir, --tags=gtagsdbpath Specifies the directory in which GTAGS and GRTAGS exist. The default is the current directory. -F Use frames for definition index, file index and main view. -l Make a name tag for each line of hypertext created. -n Print out the line numbers. -t title The title of this hypertext. Defaults to the last component of the current path. --action=cgi-url Specify the location search queries are submitted to. Defaults to the value set in htmake.conf or to http://localhost/cgi-bin/gsearch.cgi The remaining options are more general or are passed to htconfig(1). --url=base-url the base url for your new hypertext source. For best results always use absolute url's here. eg. http://host/~user/mysource It defaults to file:/destdir destdir The directory in which hypertext is generated. The default is ./HTML -v, --verbose Activate the inbuilt screen saver. Give your phosphors a workout. EXAMPLES
$ cd /usr/src/myprog $ gtags $ htmake $ cd /usr/src/myprog $ gtags -c $ htmake -c --url=http://host/~user/prog/HTML /home/user/public_html/prog FILES
/etc/gtags/htmake.conf path database BUGS
As a wrapper htmake gets to inherit bugs from other software too. Isn't life fun. This is alpha software - expect anything! SEE ALSO
htconfig(1), htags(1), gtags(1), global(1). AUTHOR
Ron Lee <ron@debian.org> CREDITS
Thanks to Shigio Yamaguchi <shigio@gnu.org> for creating GLOBAL and releasing it as free software. A truly cool productivity tool! Debian GNU/Linux 27 March 1999 HTMAKE(1)
All times are GMT -4. The time now is 03:20 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy