10 More Discussions You Might Find Interesting
1. 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
2. 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
3. Shell Programming and Scripting
I've got a file that looks like this (spaces before first entries intentional):
12345650-000005000GL140227 ANNUAL HELC FEE EN
22345650-000005000GL140227 ANNUAL HELC FEE EN
32345650-000005000GL140227 ANNUAL HELC FEE EN
I want to read through the file line by line,... (6 Replies)
Discussion started by: Scottie1954
6 Replies
4. Shell Programming and Scripting
Hi All,
Do we know how to read input file within awk script and send output toanother log file. All this needs to be in awk script, not in command line. I am running this awk through crontab.
Cat my.awk
#!/bin/awk -f
function test(var){
some code}
{
}
END
{
print"test code"
} (5 Replies)
Discussion started by: random_thoughts
5 Replies
5. Shell Programming and Scripting
Hi,
I have a set of strings in filea.
I want to search string xyz in fileb and replace next line in file b with the content from filea.
#cat filea
abc
def
ghi
#cat fileb
asdkjdslka
sajljskdjoi
xyzjjjjkko
aaaaaaaa
bbbbbbbb
cccccccc
xyzsdsajd
dddddddd
eeeeeeee (2 Replies)
Discussion started by: anilvk
2 Replies
6. Shell Programming and Scripting
I am using the while-loop to read a file.
The file has lines with null-terminated strings (words, actually.)
What I have by that reading - just a first word up to '\0'!
I need to have whole string up to 'new line' - (LF, 10#10, 16#A)
What I am doing wrong?
#make file 'grb' with... (6 Replies)
Discussion started by: alex_5161
6 Replies
7. Shell Programming and Scripting
hey gents,
I'm working on something that will use snmpwalk to query the devices on my network and retreive the device name, device IP, device model and device serial. I'm using Nmap for the enumeration and sed to clean up the results for use by snmpwalk. Once i get all the data organized I'm... (8 Replies)
Discussion started by: mitch
8 Replies
8. Shell Programming and Scripting
Hello,
I have a logfile which is in this format:
1211667249500#3265
1211667266687#2875
1211667270781#1828
Is there a way to read the logfile line by line every time I execute the code and put the two numbers in the line in two separate variables?
Something like:
1211667249500#3265... (7 Replies)
Discussion started by: dejavu88
7 Replies
9. Shell Programming and Scripting
I am using sed for a simple substitution (see command syntax below). Everything works fine except that the last line of the input file does not get written to the output file. Has anyone ever seen this and know of way to force the last line to be written?
I don't know if it's playing a part in... (3 Replies)
Discussion started by: 2reperry
3 Replies
10. Shell Programming and Scripting
Hi, I am trying to write a ftp script which will read a file for filenames and ftp those files to another server. Here's my ftp script, but it's scanning the current directory for file names.
My question is how can I pass multiple files (these files will have the name of data files that need to... (0 Replies)
Discussion started by: sajjad02
0 Replies