10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi,
I need to match for the pattern '.py' in my file and print the word which contains.
For example:
cat testfile
a b 3 4.py 5 6
a b.py c.py 4 5 6 7 8
1.py 2.py 3 4 5 6
Expected output:
4.py
b.py c.py
1.py 2.py (3 Replies)
Discussion started by: Sumanthsv
3 Replies
2. 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
3. Shell Programming and Scripting
Hi,
I have multiple directories built in following manner
/app/red/tmp
/app/blue/upd
/app/blue/tmp
/app/green/tmp
/app/red/upd
/app/green/upd
I have filenames having pattern ONE.XXX.dat TWO.ZZZ.dat and so on across the folders listed above
My objective is to list all filenames of a... (4 Replies)
Discussion started by: wahi80
4 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
Dear All,
I have a log file like below
13:26:31 |152.22
13:27:31 |154.25
13:28:31 |154.78
13:29:31 |151.23
13:30:31 |145.63
13:31:31 |142.10
13:32:31 |145.45
where values will be there from 00:00 hrs to 23:59 hrs. I'm matching for last occurance of 23:59 and printing 1440 lines (grep... (4 Replies)
Discussion started by: Naga06
4 Replies
6. UNIX for Dummies Questions & Answers
Hi,
I have files in a directory with filenames that match three specific patterns:
1) *'.L2_LAC'*
2) *'.L2_LAC_OC'*
3) *'.L2_LAC_SST'*
I would like to have an "ls" command that will list only files matching the first two patterns. However, if I type: ls *'.L2_LAC'* I will get files that... (2 Replies)
Discussion started by: msb65
2 Replies
7. UNIX for Advanced & Expert Users
Hi,
I have a patternfile with following pattern
cat
dog
cow
pig
Let's say I have thousand files
file0001
file0002
file0003
.
.
.
file1000
Each pattern can occur multiple times in multiple files. How can I search for pattern so the output of pattern and the filename is printed... (1 Reply)
Discussion started by: yoda9691
1 Replies
8. Shell Programming and Scripting
Hi all,
I'm looking for some help. I have a file (very long) that is organized like below:
>Cluster 0
0 283nt, >01_FRYJ6ZM12HMXZS... at +/99%
1 279nt, >01_FRYJ6ZM12HN12A... at +/99%
2 281nt, >01_FRYJ6ZM12HM4TS... at +/99%
3 283nt, >01_FRYJ6ZM12HM946... at +/99%
4 279nt,... (4 Replies)
Discussion started by: d.chauliac
4 Replies
9. 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
10. Shell Programming and Scripting
Hiiiii every one,
I am facing a problem while giving a file name which has space in it.
The problem is ...
I have to read a file where the set of input files are stored.
Now getting that name I have to open the file and i have to extract the name of the user from where it is written like"by... (2 Replies)
Discussion started by: kheyali Mitra
2 Replies