Sponsored Content
Top Forums Shell Programming and Scripting grep lines separated with semicolon Post 302679359 by Chubler_XL on Monday 30th of July 2012 09:36:50 PM
Old 07-30-2012
You could also dummy ";" on front and back
then search for ";value;" eg:

Code:
$ VALS="hello world;foobar;another"
$ [[ ";$VALS;" = *";hello world;"* ]] && echo yes
yes

 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

two lines into one colon separated line...

Does anyone know how to get these two output lines into one colon ':' separated line with some unix command? Maybe nawk. I've tried to read the nawk and awk man pages but I don't get it right. Are these commands the one to use? Output from find command: # /sw/tools/matlab/7.0.1/man... (2 Replies)
Discussion started by: tonlu
2 Replies

2. Shell Programming and Scripting

Extract semicolon separated delimiter

The log reads as follows. fname1;lname1;eid1;addr;pincode1; fname2;lname2;eid2;addr2;pincode2; fname3;lname3;eid3;addr3;pincode3; fname4;lname4;eid;addr4;pincode4; how do i extract only fname and save it in an array similarly for lname and so on i tried reading a file and cutting each... (5 Replies)
Discussion started by: vkca
5 Replies

3. Shell Programming and Scripting

Delete lines after semicolon

char str; char str ; char *ptr; char * ptr; int CASE; int CASE; double temp; double temp; Output should be: char str; char *ptr; int CASE; double temp; How can i do this with awk,sed,perl? (5 Replies)
Discussion started by: cola
5 Replies

4. Shell Programming and Scripting

Grep and print next 10 Lines separated by ,

Hi All, I need to grep through a file for a string and print the next ten lines to a file separating the lines with a , and save it as a csv file to open it as a XL file. The 10 lines should be on a sigle row in xl. Any suggesstions please. Note; I dont have a GNU Grep to use -A flag. ... (6 Replies)
Discussion started by: Nani369
6 Replies

5. Shell Programming and Scripting

Compare files with fields separated with semicolon

Dear experts I have files like ABD : 5869 events, relative ratio : 1.173800E-01 , sum of ratios : 1.173800E-01 VBD : 12147 events, relative ratio : 2.429400E-01 , sum of ratios : 3.603200E-01 SDF : 17000 events, relative ratio : 3.400000E-01 , sum of ratios : 7.003200E-01 OIP: 14984... (9 Replies)
Discussion started by: Alkass
9 Replies

6. Shell Programming and Scripting

Need to concatenate spuriously separated lines

Given the pattern below: 3113296571|NULL|NULL|NULL||N| 1| 0| 926667| 1001036| 0| 3076120438|NULL|NULL|NULL|NULL|DUE FOR NEW CONSENT!|N|NULL| 10198318|2011-07-25-12.34.02.786000|NULL|NULL|NULL| 0 3113336478|NULL|NULL|NULL||N| 1| ... (16 Replies)
Discussion started by: lemele
16 Replies

7. Shell Programming and Scripting

AWK:Split fields separated by semicolon

Hi all, I have a .vcf file which contains 8 coulmns and the data under each column as shown below, CHROM POS ID REF ALT QUAL FILTER INFO 1 3000012 . A G 126 ... (6 Replies)
Discussion started by: mehar
6 Replies

8. Shell Programming and Scripting

grep on string separated by spaces

hi I am on AIX 5 and i have a script that runs the following command to list processes running. I then want to kill the returned processes. The PID are on field 2 separated by spaces. $ ps -ef|grep "rams.e $PORT" lesqa 1826998 2646248 0 11:20:35 pts/2 0:00 grep rams.e t24cm 2789380 ... (3 Replies)
Discussion started by: dustytina
3 Replies

9. UNIX for Dummies Questions & Answers

Delete a semicolon and numbers after a semicolon

I have this: ((9:0.010,(11:0.089,13:0.004)) and I would like this: ((A9,(A11,A13)) How do I delete the semi colon and the number (i.e. 0.010) after the semi colon? Also, how can I add the letter before the number that is NOT removed? Thank you in advance! ---------- Post updated... (4 Replies)
Discussion started by: MDeBiasse
4 Replies

10. Shell Programming and Scripting

Replace semicolon within double quotes in a file with semicolon delimiter

Hello Team, Could you please help me with the below question? I have a file with the following properties 1) File Delimiter is ; 2) Text columns are within double quotes 3) Numeric columns will not have double quotes 4) File has total 6 columns Please see a sample record from file ... (3 Replies)
Discussion started by: sam99
3 Replies
CVSCHECK(1)							  [FIXME: manual]						       CVSCHECK(1)

NAME
cvscheck - Offline status report for files in a checked-out CVS module. SYNOPSIS
cvscheck [dir] DESCRIPTION
cvscheck prints information about the status of your local CVS checkout without communicating with the server. This means it is extremely fast and does not require a network connection. The given directory and all of its subdirectories will be processed recursively. If no directory is given, the current directory and its recursed subdirectories will be used. Each file with an interesting status will be printed with a status character in front of its name. The status characters are as follows. ? foobar.c The file is not known to CVS M foobar.c The file is definitely locally modified m foobar.c The file might have local changes. You should diff with the server to make sure. C foobar.c The file has a CVS conflict and therefore cannot be committed. U foobar.c This file is in CVS but is missing in your local checkout. T foobar.c This file has an unusual sticky CVS tag. A foobar.c You have done a cvs add for this file, but have not yet committed it. R foobar.c You have done a cvs rm for this file, but have not yet committed it. This utility is part of the KDE Software Development Kit. SEE ALSO
cvs(1) AUTHORS
cvscheck was written by Dirk Muller<mueller@kde.org> and Sirtaj.Singh.Kang; <taj@kde.org> This manual page was prepared by Ben Burton<bab@debian.org> for the Debian GNU/Linux system (but may be used by others). [FIXME: source] March 8, 2003 CVSCHECK(1)
All times are GMT -4. The time now is 02:02 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy