Sponsored Content
Full Discussion: Apply to end of line
Top Forums Shell Programming and Scripting Apply to end of line Post 77724 by sysera on Tuesday 12th of July 2005 10:26:41 AM
Old 07-12-2005
Apply to end of line

Heyo all,
I'm working on a script to generate some simple web based statistics for a project I'm on. I'm ending up with the following lines that follow the same basic format:

SYSTEM.ADMIN.PERFM.EVENT 0
SYSTEM.ADMIN.QMGR.EVENT 1
SYSTEM.AUTH.DATA.QUEUE 28
SYSTEM.CHANNEL.INITQ 0
SYSTEM.CHANNEL.SYNCQ 0

I'm trying to find a way to take the numbers at the end of each line, and be able to apply a modification to them. For example:
SYSTEM.AUTH.DATA.QUEUE 28 - becomes - SYSTEM.AUTH.DATA.QUEUE <b>28</b> to highlight the number in bold letters on the page.

I'm racking my brain trying to find an efficient way to pull it off. Any suggestions would rule. Thanks as always. Smilie
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Copying x words from end of line to specific location in same line

Hello all i know it is pretty hard one but you will manage it all after noticing and calculating i find a rhythm for the file i want to edit to copy the last 12 characters in line but the problem is to add after first 25 characters in same line in other way too copy the last 12 characters... (10 Replies)
Discussion started by: princesasa
10 Replies

2. Shell Programming and Scripting

Get the 1st 99 characters and add new line feed at the end of the line

I have a file with varying record length in it. I need to reformat this file so that each line will have a length of 100 characters (99 characters + the line feed). AU * A01 EXPENSE 6990370000 CWF SUBC TRAVEL & MISC MY * A02 RESALE 6990788000 Y... (3 Replies)
Discussion started by: udelalv
3 Replies

3. Shell Programming and Scripting

Apply 'awk' to all files in a directory or individual files from a command line

Hi All, I am using the awk command to replace ',' by '\t' (tabs) in a csv file. I would like to apply this to all .csv files in a directory and create .txt files with the tabs. How would I do this in a script? I have the following script called "csvtabs": awk 'BEGIN { FS... (4 Replies)
Discussion started by: ScKaSx
4 Replies

4. Shell Programming and Scripting

adding characters end of line where line begins with..

Hi all, using VI, can anyone tell me how to add some characters onto the end of a line where the line begins with certain charactars eg a,b,c,......., r,s,t,........, a,b,c,......., all lines in the above example starting with a,b,c, I want to add an x at the end of the line so the... (6 Replies)
Discussion started by: satnamx
6 Replies

5. Shell Programming and Scripting

find a certain line and append text to the end of the line

After I create printer queues in AIX, I have to append a filter file location within that printers custom file. within lets say test_queue.txt I need to find the row that starts with :699 and then I need to append on the end the string /usr/local/bin/k_portrait.sh. Now I've gotten the sed... (2 Replies)
Discussion started by: peachclift
2 Replies

6. UNIX for Dummies Questions & Answers

How to specify beginning-of-line/end-of-line characters inside a regex range

How can I specify special meaning characters like ^ or $ inside a regex range. e.g Suppose I want to search for a string that either starts with '|' character or begins with start-of-line character. I tried the following but it does not work: sed 's/\(\)/<do something here>/g' file1 ... (3 Replies)
Discussion started by: jawsnnn
3 Replies

7. UNIX for Dummies Questions & Answers

vim copy line and paste at the beginning, middle, and end of another line

How would you do vim copy line and paste at the beginning, middle, and end of another line. I know yy copies the whole line and p pastes the whole line, but on its own separate line. Sometimes I would like to copy a line to the beginning, middle, or end of another line. I would think this would be... (3 Replies)
Discussion started by: cokedude
3 Replies

8. Shell Programming and Scripting

Adding tab/new line at the end of each line of a file

Hello Everyone, I need a help from experts of this community regarding one of the issue that I am facing with shell scripting. My requirement is to append char's at the end of each line of a file. The char that will be appended is variable and will be passed through command line. The... (20 Replies)
Discussion started by: Sourav Das
20 Replies

9. Shell Programming and Scripting

With script bash, read file line per line starting at the end

Hello, I'm works on Ubuntu server My goal : I would like to read file line per line, but i want to started at the end of file. Currently, I use instructions : while read line; do COMMAND done < /var/log/apache2/access.log But, the first line, i don't want this. The file is long... (5 Replies)
Discussion started by: Fuziion
5 Replies

10. Shell Programming and Scripting

Printing string from last field of the nth line of file to start (or end) of each line (awk I think)

My file (the output of an experiment) starts off looking like this, _____________________________________________________________ Subjects incorporated to date: 001 Data file started on machine PKSHS260-05CP ********************************************************************** Subject 1,... (9 Replies)
Discussion started by: samonl
9 Replies
SYSTEM-AUTH(5)							 Linux-PAM Manual						    SYSTEM-AUTH(5)

NAME
system-auth - Common configuration file for PAMified services SYNOPSIS
/etc/pam.d/system-auth /etc/pam.d/password-auth /etc/pam.d/fingerprint-auth /etc/pam.d/smartcard-auth DESCRIPTION
The purpose of these configuration files are to provide a common interface for all applications and service daemons calling into the PAM library. The system-auth configuration file is included from nearly all individual service configuration files with the help of the substack direc- tive. The password-auth fingerprint-auth smartcard-auth configuration files are for applications which handle authentication from different types of devices via simultaneously running individual conversations instead of one aggregate conversation. NOTES
Previously these common configuration files were included with the help of the include directive. This limited the use of the different action types of modules. With the use of substack directive to include these common configuration files this limitation no longer applies. BUGS
None known. SEE ALSO
pam(8), config-util(5), postlogin(5) The three Linux-PAM Guides, for system administrators, module developers, and application developers. Red Hat 2010 Dec 22 SYSTEM-AUTH(5)
All times are GMT -4. The time now is 12:37 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy