10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi all,
i am trying to process a list of values in FILE like this:
aaa:bbb
ccc:ddd
eee:fff
With the following logic:
for INFO in FILE
do
export F1=`cut -f1,3,5,7 -d":" < FILE`
export F2=`cut -f2,3,5,7 -d":" < FILE`
ssh $F1 bash <<EOF
echo $F1
echo $F2
date (10 Replies)
Discussion started by: jonnyd
10 Replies
2. Shell Programming and Scripting
Trying to use code that I found to send only new lines out of a log file by doing:
while :; do
temp=$(tail -1 logfile.out)
awk "/$last/{p=1}p" logfile.out #pipe this to log analyzer program
last="$temp"
sleep 10
done
Script works fine when logfile is basic text, but when it contains... (2 Replies)
Discussion started by: moo72moo
2 Replies
3. Infrastructure Monitoring
I can get this working, but if something is down I get an error and the script does not move on. I can not get the "else" function working. What might I be doing wrong?
use SNMP::Simple
my %ios = ();
$list="list.list";
open(DAT, $list) || die("Can't Open List");
@raw_data=<DAT>;... (4 Replies)
Discussion started by: mrlayance
4 Replies
4. UNIX for Advanced & Expert Users
I have input file called file1 with characters that have \\ in it.
I cannot change input file, because it is generated earlier in script.
Now would like to replace string on line in file called bfile with output from file1
I have been using sed command.
$cat file1
pc//6sPxp==
$ cat scr1... (4 Replies)
Discussion started by: drtabc
4 Replies
5. Programming
hi friends i have a problem in signal handling ...
let me explain my problem clearly..
i have four process ..
main process forks two child process and each child process again forks another new process respectively...
the problem is whenever i kill the child process it is reforking and the... (2 Replies)
Discussion started by: senvenugopal
2 Replies
6. Shell Programming and Scripting
Hi,
Here is my piece of code--
sub per_user_qna_detail
{
for($index=0;$index<@records;$index++)
{
if($records =~ m/^(.*)\s*Morocco.*Entering\s*Module::authenticate/)
{
printf "INSIDE per_user_qna_detail on LINE NO $index\n";
$Time_Stamp = $1;... (0 Replies)
Discussion started by: namishtiwari
0 Replies
7. Programming
For a program I am designing, which involves handling the keyboard input Ctrl^c (SIGINT), it is taking ages for the program to actually recognise and perform the corresponding action whenever I run it and hit Ctrl^C at the CL. I have to do at least 3 Ctrl^Cs before the program will actually... (3 Replies)
Discussion started by: JamesGoh
3 Replies
8. Shell Programming and Scripting
Hi all,
How do I extract a value without special characters? I need to extract the value of %Used from below and if its greater than 80, need to send a notification.
I am doing this right now..Its giving 17%..Is there a way to extract the value and assign it to a variable in one step?
df |grep... (3 Replies)
Discussion started by: sam_78_nyc
3 Replies
9. UNIX for Advanced & Expert Users
Hello everyone,
I use Samba to copy mp3 files to my Red Hat 8.0 box so I can randomize them through a playlist. When I copy:
Sigur Rós-Nýja Lagið.mp3
It shows in the mapped drive on Windows as:
Sigur Rós-N_ja Lagi_.mp3
And via Putty as:
Sigur R(grayed box)s-N_ja Lagi_.mp3
What is going... (1 Reply)
Discussion started by: effigy
1 Replies
10. Solaris
Dear All,
I have created a UTF-8 database to store multi-lingual charcters. Below is the query from which i insert from Winsql (front-end third party database browser tool), the data gets inserted properly.
insert into a (no, lbl)
values (1, "Cliquez ici pour revenir Ã_ la recherche de... (2 Replies)
Discussion started by: lloydnwo
2 Replies