Sponsored Content
Top Forums Shell Programming and Scripting Combine multiple string into 1 string group by certain criteria Post 302314606 by whchee on Friday 8th of May 2009 11:09:30 PM
Old 05-09-2009
Hammer & Screwdriver

Hi Vgersh,

The logic seems working by reading it, neat and understandable. However, i can only test it on Monday. Will let you know the result then.

Btw, if i keen on using awk only, will there be lot diff with nawk?

I am not so sure is nawk working in HP-UX environment not...
Kindly advice.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

replacing a string in multiple subdirs to a new string??

I have following set of dirs: /dir1/dir2/subdir1 file1 file2 /dir1/dir3/subdir1 file4 file5 /dir1/dir4/subdir1 file6 file7 All of these files have a common string in them say "STRING1", How can I... (3 Replies)
Discussion started by: Hangman2
3 Replies

2. Shell Programming and Scripting

Need to find a string, check the next line, and if it matches certain criteria, replace it with a s

Hey Fellas. I am new to scripting. I have searched through the forums and found a lot of good info, but I can't seem to get any of it to work together. I am trying to find a particular sting in a file, and if the next string matches certain criteria, replace it with a string from a csv... (6 Replies)
Discussion started by: midniteslice
6 Replies

3. Shell Programming and Scripting

How to combine two string into one?

Hi, I would like to ask whether is it possible to do the following: let say i have 2 files and the content of the file are: first file: a = b:c:d second file: a = c:d:e can i read this 2 files and create a third file that will have this result? third file: a=b:c:d:e is this possible by... (8 Replies)
Discussion started by: llobak
8 Replies

4. UNIX for Dummies Questions & Answers

Combine multiple files with common string into one new file.

I need to compile a large amount of data with a common string from individual text files throughout many directories. An example data file is below. I want to search for the following string, "cc_sectors_1" and combine all the data from each file which contains this string, into one new... (2 Replies)
Discussion started by: GradStudent2010
2 Replies

5. Shell Programming and Scripting

replace (sed?) a single line/string in file with multiple lines (string) from another file??

Can someone tell me how I can do this? e.g: Say file1.txt contains: today is monday the 22 of NOVEMBER 2010 and file2.txt contains: the 11th month of How do i replace the word NOVEMBER with (5 Replies)
Discussion started by: tuathan
5 Replies

6. Shell Programming and Scripting

replace (sed?) a string in file with multiple lines (string) from variable

Can someone tell me how I can do this? e.g: a=$(echo -e wert trewt ertert ertert ertert erttert erterte rterter tertertert ert) How do i replace the STRING with $a? I try this: sed -i 's/STRING/'"$a"'/g' filename.ext but this don' t work (2 Replies)
Discussion started by: jforce
2 Replies

7. Shell Programming and Scripting

sed or awk command to replace a string pattern with another string based on position of this string

here is what i want to achieve... consider a file contains below contents. the file size is large about 60mb cat dump.sql INSERT INTO `table1` (`id`, `action`, `date`, `descrip`, `lastModified`) VALUES (1,'Change','2011-05-05 00:00:00','Account Updated','2012-02-10... (10 Replies)
Discussion started by: vivek d r
10 Replies

8. Shell Programming and Scripting

Find and replace string matching criteria

Dear Friends, I am looking for a way to replace a string (multiple lines) starting with something and ending with something (these two values do not change) with blank. Basically I want to delete this code injection accross many sites and folders. Search Code (across files and folders) that... (2 Replies)
Discussion started by: libras
2 Replies

9. Shell Programming and Scripting

Group by and string concatenation

Hi, I was trying to work on a file which had the following data format 1 hi 1 this 1 is 1 john 2 hello 3 test 3 case the expected output file is the below 1 hi, this, is, john 2 hello 3 test, case I tried using awk or while read, but I couldnt... (13 Replies)
Discussion started by: karthikbhuvana
13 Replies

10. Shell Programming and Scripting

Remove multiple lines from a particular string to particular string

Hi, I have a file containing the DDLs of tables in a schema. From that I need to remove all the lines from a starting string till a specific string. Here is an example. File1.txt ------------- CREATE TABLE "SCHEMA1"."LKP11_TBL_USERS" ( "ID" NUMBER(8,0) NOT NULL ENABLE, "USER_ID"... (3 Replies)
Discussion started by: satyaatcgi
3 Replies
RCSDIFF(1)						      General Commands Manual							RCSDIFF(1)

NAME
rcsdiff - compare RCS revisions SYNOPSIS
rcsdiff [ -biwt ] [ -cefhn ] [ -rrev1 ] [ -rrev2 ] file ... DESCRIPTION
Rcsdiff runs diff (1) to compare two revisions of each RCS file given. A file name ending in ',v' is an RCS file name, otherwise a working file name. Rcsdiff derives the working file name from the RCS file name and vice versa, as explained in co (1). Pairs consisting of both an RCS and a working file name may also be specified. All options except -r have the same effect as described in diff(1). If both rev1 and rev2 are omitted, rcsdiff compares the latest revision on the trunk with the contents of the corresponding working file. This is useful for determining what you changed since the last checkin. If rev1 is given, but rev2 is omitted, rcsdiff compares revision rev1 of the RCS file with the contents of the corresponding working file. If both rev1 and rev2 are given, rcsdiff compares revisions rev1 and rev2 of the RCS file. Both rev1 and rev2 may be given numerically or symbolically. EXAMPLES
The command rcsdiff f.c runs diff on the latest trunk revision of RCS file f.c,v and the contents of working file f.c. IDENTIFICATION
Author: Walter F. Tichy, Purdue University, West Lafayette, IN, 47907. Revision Number: 1.2 ; Release Date: 86/05/19 . Copyright (C) 1982 by Walter F. Tichy. SEE ALSO
ci (1), co (1), diff (1), ident (1), rcs (1), rcsintro (1), rcsmerge (1), rlog (1), rcsfile (5). Walter F. Tichy, "Design, Implementation, and Evaluation of a Revision Control System," in Proceedings of the 6th International Conference on Software Engineering, IEEE, Tokyo, Sept. 1982. BUGS
Purdue University 5/19/86 RCSDIFF(1)
All times are GMT -4. The time now is 11:17 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy