9 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hello,
I'm trying to figure out how to speed up the following as I want to use multiple commands to search thousands of files.
is there a way to speed things up?
Example I want to search a bunch of files for a specific line, if this line already exists do nothing, if it doesn't exist add it... (4 Replies)
Discussion started by: f77hack
4 Replies
2. Shell Programming and Scripting
Hi all,
I have a log file say Test.log that gets updated continuously and it has data in pipe separated format. A sample log file would look like:
<date1>|<data1>|<url1>|<result1>
<date2>|<data2>|<url2>|<result2>
<date3>|<data3>|<url3>|<result3>
<date4>|<data4>|<url4>|<result4>
What I... (3 Replies)
Discussion started by: pat_pramod
3 Replies
3. Shell Programming and Scripting
Hello,
I need a program that read a file line by line and prints out lines 1, 2 & 3 after an empty line... An example of entries in the file would be:
SRVXPAPI001 ERRO JUN24 07:28:34 1775
REASON= 0000, PROCID= #E506 #1065: TPCIPPR, INDEX= 003F
... (8 Replies)
Discussion started by: Ferocci
8 Replies
4. Shell Programming and Scripting
So, I want to read line-by-line a text file with unknown number of files....
So:
a=1
b=1
while ; do
b=`sed -n '$ap' test`
a=`expr $a + 1`
$here do something with b etc
done
the problem is that sed does not seem to recognise the $a, even when trying
sed -n ' $a p'
So, I cannot read... (3 Replies)
Discussion started by: hakermania
3 Replies
5. Shell Programming and Scripting
this is the csv file.
i want to check the last line contains the character N.
Record Type#Batch Job ID#Batch Number#FileCreation Date#FileCreation Time#Production/Test Fileindicator#File Character
H#0002#0002#20100218#17.25#P#barani
Record Type#A#B#C#D#E#F#G#H#J#K#L... (5 Replies)
Discussion started by: barani75
5 Replies
6. UNIX for Advanced & Expert Users
File 1
<html>ta da....unique file name I want to give file=>343...</html>
<html>da ta 234 </html>
<html>pa da 542 </html>
and so on...
File 2
343
234
542
and so on, each line in File 1 one also corresponds with each line in File 2
I have tried several grep, sed, while .. read, do,... (4 Replies)
Discussion started by: web_developer
4 Replies
7. Shell Programming and Scripting
Have come up with the following but it doesn't seem to work.. Is there some other command i could use to get this to work?
OUTPATH=/home/out
PARMFILE=$OUTPATH/jobcount_test.txt
LOG=$OUTPATH/job_count_monthlymail_log.txt
HLOG=$OUTPATH/job_count_monthlymail_hlog.txt
#
echo " started at... (2 Replies)
Discussion started by: Jazmania
2 Replies
8. Shell Programming and Scripting
Folks
How best to read the last line of a file, to check for a particular value?
This is the last line of my file......
00000870000002000008 0000000020000
......I need to check that this line contains '70' in positions 7 and 8, before I continue processing.
Regards ... Dave (12 Replies)
Discussion started by: daveaasmith
12 Replies
9. Shell Programming and Scripting
Hi all,
How do we check in a file whether a line started with KEYWORD2 is right after the line started with KEYWORD1
for example, this file content:
Abcdef gsh iasdi
94945 9085095 lksdjlkj
KEYWORD1 skljfi slakjfoi ' opiport sdfl
KEYWORD2 ksjflsk jfasope
jkdfsk393 89374982 23
... (3 Replies)
Discussion started by: fongthai
3 Replies