10 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
Guys i need an idea for one logic..in shell scripting am struggling with a logic...So the thing is... i need to search for a word in a huge log file and i need to continue to print few more lines from that line and the consecutive line has to end when it finds the line with date..because i know... (1 Reply)
Discussion started by: Prathi
1 Replies
2. Shell Programming and Scripting
Hello,
im creating a csv file for email reporting on issues.
my problem is that after 'continue' command in if statment in a loop
the new paramter writing into the log doesnt take new line.
timeout 4s zabbix_get -I $ZBX -p $PORT -s $IP -k "system.run"
if ; then
... (3 Replies)
Discussion started by: batchenr
3 Replies
3. Shell Programming and Scripting
Hello to all,
I'm new to perl, I have input file that contains the string below:
315350535ff450000014534130101ff4500ff45453779ff450ff45545f01ff45ff453245341ff4500000545000This string has as line separator "ff45". So, I want to print each line but the code below is not working.
perl -pe '... (2 Replies)
Discussion started by: Ophiuchus
2 Replies
4. Shell Programming and Scripting
Hello,
I have a very long instruction to write, but, for lisibility reasons, I would like to cut it on more than one line and comment each lines.
is it possible ?
thanks :b: (1 Reply)
Discussion started by: shadok
1 Replies
5. Shell Programming and Scripting
so in unix this command works works and shows me a list of directories
find . -name \*.xls -exec dirname {} \; | sort -u | > list.txt
but when i try running a perl script to run this command
my $query = 'find . -name \*.xls -exec dirname {} \; | sort -u | > list.txt';... (2 Replies)
Discussion started by: kpddong
2 Replies
6. Shell Programming and Scripting
Hello all,
I am trying to do a tail in a script. But when I quit the tail my script quits also. This is not what I want. I am struggling to get this done.
#!/bin/bash
askFile() {
echo -n "Enter file: "
read FILE
}
doTail() {
tail -F "${1}"
}
askFile
doTail... (4 Replies)
Discussion started by: markdark
4 Replies
7. Shell Programming and Scripting
I have a script that runs a console/terminal command on the server and what is want is for each of the multiple success reports fed back from the clients (echo-ed out onto the conosle) to be counted and after x number of reports reboot the server.
The Details:
The command (program) is... (0 Replies)
Discussion started by: dp123
0 Replies
8. Shell Programming and Scripting
Hi
I have a log file (say log.txt). I have to search for a line which has the string ( say ERROR) in the log file and copy 15 lines after this into another file (say error.txt). Can someone give me the code and this has to be in PERL
Thanks in advance
Ammu (3 Replies)
Discussion started by: ammu
3 Replies
9. Shell Programming and Scripting
I have
for i in 1 2 3 4
do
echo $i >> test.txt
done
test.txt contains ... 1
2
3
4
But I want it to contain ... 1234
Any suggestions? (3 Replies)
Discussion started by: Bandit390
3 Replies
10. Shell Programming and Scripting
Hello, I need advice on how to check if started processes are finished in perl, here's explanation :
OS is RHEL 4, perl -v = "This is perl, v5.8.0 built for i386-linux-thread-multi"
The logic of the script :
#!/usr/bin/perl
use warnings;
$param1 = $ARGV;
$param2 = $ARGV;
$param3 =... (2 Replies)
Discussion started by: sysgate
2 Replies