10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
we want to fetch the latest file in a given directory and also the file name should match the below pattern
Example file name ->hrdata-2015-10-13-16-45-26.xml(2015-10-13-16-45-26- it is not current timestamp, we just need to check for the pattern)
We expect the file will have the... (3 Replies)
Discussion started by: vishwanath001
3 Replies
2. UNIX for Beginners Questions & Answers
I think what I'm trying to do is pretty straightforward but I just can't find a way to do it.
I'm trying to run a double pattern match in a three column file. If the first two columns match, I need to output the third.
So in the file
AAA BBB 1
BBC CCC 5
CCC DDD 7
DDD EEE 12
If the... (4 Replies)
Discussion started by: matthewndavies1
4 Replies
3. Shell Programming and Scripting
I have the below plain text file where i have some result, in order to mail that result in html table format I have written the below script and its working well. cat result.txt
Page 2015-01-01 2000
Colors 2015-02-01 3000
Landing 2015-03-02 4000
#!/bin/sh LOG=/tmp/maillog.txt... (1 Reply)
Discussion started by: close2jay
1 Replies
4. Shell Programming and Scripting
'Hi
I'm using the following code to extract the lines(and redirect them to a txt file) after the pattern match. But the output is inclusive of the line with pattern match.
Which option is to be used to exclude the line containing the pattern?
sed -n '/Conn.*User/,$p' > consumers.txt (11 Replies)
Discussion started by: essem
11 Replies
5. Shell Programming and Scripting
Hi,
I have field in a file which would come with any special character, how do i check that field?
Eg: @123TYtaasa>>>/ 131dfetr_~2
In the above example, how do I add pattern for any special character on the keyboard.
Thanks (3 Replies)
Discussion started by: techmoris
3 Replies
6. Shell Programming and Scripting
Hi,
I am trying to replace a specific column values in a csv file with double quotes.
Example:
SNO,NAME,ZIPCODE,RANK,CARE_OF
1,Robert,74538,12,RICHARD JOHNSON, P.C
2,Sam,07564,13,% R.S MIKE, V.K.S
3,Kim, Ed,12345,14,@90 KMS, %TK
Desired Output:
SNO,NAME,ZIPCODE,RANK,CARE_OF... (1 Reply)
Discussion started by: techmoris
1 Replies
7. Shell Programming and Scripting
Hi All,
Below I am discussing the problem I am facing while using pattern matching in Unix & Window. Plz hv a look into it.
================
my $s="UPDATE A
SET s="klkkk'
;" ;
if ( $s =~ m/^*UPDATE+/i )
{
print $s;
}
else
{ print "no match";}
===================
Both should... (6 Replies)
Discussion started by: Niroj
6 Replies
8. Shell Programming and Scripting
Hi,
I have file 1.txt with following entries as shown:
0152364|134444|10.20.30.40|015236433
0233654|122555|10.20.30.50|023365433
**
**
**
In file 2.txt I have the following entries as shown:
0152364|134444|10.20.30.40|015236433
0233654|122555|10.20.30.50|023365433... (4 Replies)
Discussion started by: imas
4 Replies
9. UNIX for Advanced & Expert Users
Task is to identify files like code.1 , code.23 and so on ... (the files which are ending with a number) but it should not match files like code.123abc. So the search will normally search for files with "code." and at the end we should extract for the correct match. Now I have to remove these files... (6 Replies)
Discussion started by: diwakar_reddy
6 Replies
10. Shell Programming and Scripting
Hello All,
I need help I have a problem in searching the pattern in a file
let us say the file contains the below lines
line 1 USING *'/FILE/FOLDER/RETURN')
.................
.................
line 4 USING *'/FILE/FOLDER/6kdat1')
line 5 USING... (2 Replies)
Discussion started by: maxmave
2 Replies