Sponsored Content
Top Forums Shell Programming and Scripting Include strings between a pattern Post 302938089 by manid on Thursday 12th of March 2015 02:34:47 AM
Old 03-12-2015
Yes the pattern is unique. I have to place the values read from file2 into file between those quotes. After update file1 should look like this

Code:
sample statements1

<UID = "admin"  PWD = "password">

sample statements2


Last edited by manid; 03-12-2015 at 04:17 AM..
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Extracting lines between 2 strings only if the pattern patches

Hi Friends, Please help me with the following problem: I have an xml file with the following lines: <init-param> <param-name>/default/directory</param-name> <param-value>default</param-value> </init-param> <init-param> ... (5 Replies)
Discussion started by: simran
5 Replies

2. UNIX for Dummies Questions & Answers

Finding Unique strings which match pattern

I need to grep for a pattern in a file. Files are huge and have several repeated occurances of the strings which match pattern. I just need the strings which contain the pattern in the output. For eg. The contents of my file are as follows. The pattern I want to match by is ABCD ... (5 Replies)
Discussion started by: tektips
5 Replies

3. Shell Programming and Scripting

Include Line Before Pattern Using Sed / Awk

Hi, I have a sql file that runs something like this vi Test.sql REVOKE EXECUTE ON DEMO_USER.SQC_SAMP FROM PUBLIC; REVOKE EXECUTE ON DEMO_USER.SQC_SAMP FROM DEMO_READ; REVOKE SELECT ON DEMO_USER.DEMO_NOMINEE_TEST FROM DEMO_READ; REVOKE EXECUTE ON DEMO_USER.SQC_SAMP FROM... (3 Replies)
Discussion started by: rajan_san
3 Replies

4. Shell Programming and Scripting

Extracting the strings matching a pattern from a word

Hi All , I need to extract the strings that are matching with the pattern : CUST.<AnyStringOfAnyLength>.<AnyStringOfAnyLength> from a file and then write all these string into another file. e.g. If a file SOURCE contains following lines : IF(CUST.ABCD.EFGH==1) THEN CUST.ABCD.EFGH =... (7 Replies)
Discussion started by: swapnil.nawale
7 Replies

5. UNIX for Advanced & Expert Users

Remove rows which include the word pattern

Hi, I'm trying to remove rows that including specific word, but the below is replacing only the first occurrence, how to do this for the all occurrences within the file. grep -v "mdsMVLink\|mdsMVMembership\|mdsMVLinkType" sfile.txt > dfile.txt Could someone help me how to accomplish this? ... (2 Replies)
Discussion started by: john_prince
2 Replies

6. UNIX for Dummies Questions & Answers

Extraction of strings from a file, after pattern matching

I need to extract strings from a file. The file contains data like: Plan ABCD IN-+-172BB---118C2C---GGN_342-+-MM77_23--+-LAS24_3|GGK_774 | | \-LAS24_2|GGN_774 | +-AA_800_1-+-BAS_000|GGK_362 | | \-BAS_001|GGK_360 | \-DD_000T1---DAM_001|STEEL_0 Plan SHELL_1... (3 Replies)
Discussion started by: abkush
3 Replies

7. Shell Programming and Scripting

Recursive search on pattern between two strings

Objective: Recursively search all files under a directory for SQL statements that end with ";" Sample input: UPDATE table1 set col=val UPDATE table2 set cola=vala ,colb=valb; UPDATE table3 set col=val Expected output: UPDATE table2 set cola=vala ,colb=valb; (1 Reply)
Discussion started by: krishmaths
1 Replies

8. Shell Programming and Scripting

Sorting alphanumeric strings without a pattern

Good evening to all!! I'm facing this problem: I saved in a txt a list of files name (one txt for every folder): hello0.jpg hello1.jpg hello10.jpg hello11.jpg hello12.jpg hello13.jpg hello14.jpg hello15.jpg hello16.jpg hello17.jpg hello18.jpg hello19.jpg hello2.jpg hello20.jpg... (32 Replies)
Discussion started by: silver18
32 Replies

9. Shell Programming and Scripting

how to include a text pattern in system function in PERL

Pleeeeease help.. I'm working in perl i have a system function to check whether a file is readable for others or not. i just want to print a text in that command my command is : system ("ls -la $filename | awk '\$1~ /^-......r../ {print \$9}'"); i know for displaying text in awk... (6 Replies)
Discussion started by: shubhamsachdeva
6 Replies

10. Shell Programming and Scripting

How to include file pattern in find command?

Hi I've to remove the files which has the following file pattern in path /home/etc/logs fnm_HST_date1 fnm_hst_date1 fnm_HST_date2 I've used the following code to to remove the files having file names like "HST" . #!/usr/bin/ksh set -x file_path=/home/etc/logs file_nm=HST find... (2 Replies)
Discussion started by: smile689
2 Replies
load_sample(3alleg4)						  Allegro manual					      load_sample(3alleg4)

NAME
load_sample - Loads a sample from a file. Allegro game programming library. SYNOPSIS
#include <allegro.h> SAMPLE *load_sample(const char *filename); DESCRIPTION
Loads a sample from a file, supporting both mono and stereo WAV and mono VOC files, in 8 or 16-bit formats, as well as formats handled by functions registered using register_sample_file_type(). Example: SAMPLE *sample = load_sample(user_input); if (!sample) abort_on_error("Couldn't load sample!"); RETURN VALUE
Returns a pointer to the SAMPLE or NULL on error. Remember to free this sample later to avoid memory leaks. SEE ALSO
destroy_sample(3alleg4), load_voc(3alleg4), load_wav(3alleg4), play_sample(3alleg4), save_sample(3alleg4), register_sam- ple_file_type(3alleg4), exsample(3alleg4) Allegro version 4.4.2 load_sample(3alleg4)
All times are GMT -4. The time now is 03:24 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy