10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I have a log file that looks like this. the lines are grouped. 2 lines per entry.
M: 2019-01-25 13:02:31.698 P25, received network transmission from KI4EKI to TG 10282
M: 2019-01-25 13:02:35.694 P25, network end of transmission, 4.3 seconds, 1% packet loss
M: 2019-01-25 13:02:38.893 P25,... (7 Replies)
Discussion started by: ae4ml
7 Replies
2. Shell Programming and Scripting
Good Morning,
Every so often, I have copy scripts that to don't complete, but I don't immediately know why. It usually ends up being a permissions issue or a length issue.
The scripts edit a log file, so I'd like to include any copy errors/issues in that file to check if the copies... (4 Replies)
Discussion started by: Stellaman1977
4 Replies
3. UNIX for Dummies Questions & Answers
I have many files that can have various amounts of rows. I essentially want to output each row into a new file if a pattern is matched between two files.
I have some code that does something similar but I want it to output every single input row from every file into a separate output file; that... (5 Replies)
Discussion started by: verse123
5 Replies
4. UNIX for Dummies Questions & Answers
I need to enable set -x in my croned script as at times the script is not returning all data that it should be. This only happens intermittently and as such I would like a means of being able to check what goes wrong.
My question is how to output the debug of set -x to file? (1 Reply)
Discussion started by: rob171171
1 Replies
5. Shell Programming and Scripting
I had a question about grep.
If I grep for something in a file, the output shows me all the lines in which that 'something' is contained in.
Is there a way to also output all the lines in which that 'something' wasnt contained in.
Say I have a file with a bunch of names and I do:
grep scott... (2 Replies)
Discussion started by: ndedhia1
2 Replies
6. Shell Programming and Scripting
is there anyway i can paste/cat a text file into a html paragraph <p>
function html_header
{
cat <<END
<html>
<head><title>${1}</title></head>
<body>
<p>
${2}
</p>
END
}
function html_footer
{
cat <<END
</body>
</html>
END (2 Replies)
Discussion started by: magnia
2 Replies
7. Shell Programming and Scripting
I'm trying to take a list of domains, find out the MX resolve it to IP then find out what the NS is and output the contents to a new file.
The only problem i'm having is when checking the Ip or host of the MX i can only get it to print the column with the MX record and the results of the host... (1 Reply)
Discussion started by: spartan22
1 Replies
8. Programming
To successfully export a perl GD::Graph object to a graphics file (e.g. a .png file), do you do the following ?
# Set graph data
$graph->set(....);
$graph->plot(\@graph_data);
open(IMG,'>file.png') or die $!;
binmode IMG;
print IMG $graph->png;
close IMG;
Reason Im asking is... (1 Reply)
Discussion started by: JamesGoh
1 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 have the code below which outputs all the lines of a CSV file but I'd like it to only output 15 lines then save the current line as a variable which could be used (as a link) to display the next 15 lines. I can't get my head around the logic! Please help :D
while ($data = fgetcsv($fp,... (1 Reply)
Discussion started by: pondlife
1 Replies