11-02-2012
I understand that the log will be mixed up as I am running the curl command in the background. But the echo request should be in the log for 20 times right? I tested my script in different computers and they all show request 20 times in the log. It is just not working in my computer on cygwin. If you look at my log.log above, I am fine with the curl response mixed up but I see only one line "request # 1". The remaining echos are missing. As you said it may be coincidental. But I am not sure why it works every time in other computers.
Thanks for the code you sent. I guess I can use it in my machine to fix the issue.
Last edited by heykiran; 11-02-2012 at 12:59 PM..
Reason: Added more info
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Portion of my script below :
if ; then
NUMBEROFFEILDS=`cat ${BASE_SCRIPT_LOC}/standardfilecleanup.lst|grep -w ${db_file_path}|awk -F: '{print NF}'`
COUNT=4
while ; do
awk_var="$"`echo $COUNT`
file_name1=`cat ${BASE_SCRIPT_LOC}/standardfilecleanup.lst|grep -w... (1 Reply)
Discussion started by: findprakash
1 Replies
2. UNIX for Dummies Questions & Answers
Apologies for the trivial nature of this question but I cannot seem to get a simple re direct to a log file to work
Step 1
touch log.txt
at -f batch.sh now >> log.txt
I am trying to get the batch.sh contents into the log file
Manny Thanks (8 Replies)
Discussion started by: JohnCrump
8 Replies
3. UNIX for Dummies Questions & Answers
I am trying to write a script which will output notifications to a logfile, but I would like to cap the logfile to, let's say, 200 lines.
Specifically I am using custom firmware, DD-wrt, on my router and I am implementing a script to connect to my work vpn. I have a loop that pings a computer... (2 Replies)
Discussion started by: joemommasfat
2 Replies
4. Shell Programming and Scripting
I'm using cygwin on win7, What I would like to do is something like this:
cygstart cygwin tail -f /foo/test.log | perl -pe 's/error/\e
I know I can start a new instance using either of these:
mintty -e ...
cygstart tail ...
But neither of those open in ANSI mode, so I can't do... (0 Replies)
Discussion started by: Validatorian
0 Replies
5. Shell Programming and Scripting
I am running tcsh/csh shell on my machine. lately i have realized my stderr file redirection is not working.
Please find the terminal logs as below:
>echo b c >>& log
>cat log
b c
>echo $a b c >>& log
a: Undefined variable.
>cat log
b c
I have never faced such issues, hence not sure... (5 Replies)
Discussion started by: animesharma
5 Replies
6. Shell Programming and Scripting
Hi, I have downloaded a web page that I need to cleanup before passing to xmlstarlet.
Using UltraEdit's HEX utility part of my download is as follows:
3C 2F 61 3E 0A 09 0A 09 09 3C 2F 61 3E
which in ASCII is
</a>
</a>
I need to locate this string and replace it with just... (7 Replies)
Discussion started by: dazhoop
7 Replies
7. Shell Programming and Scripting
I need to count the number of lines in a .txt file and put it in a variable.
I am using the following code
#!/bin/bash
count = $(wc -l "some file.txt" | awk '{print$1}')
echo $count
It is giving the following error.
line3: count: command not foundWhat am I doing wrong here? :confused: (7 Replies)
Discussion started by: haritha.gorijav
7 Replies
8. UNIX and Linux Applications
I have windows XP machine.
Today i have tried to install Cygwin, I've downloaded all the packages then ran the setup. It's showed completed.
But when i try to open this it's not working.
Do i need to do anything extra for this..?
Please help... (3 Replies)
Discussion started by: pamu
3 Replies
9. Red Hat
hey,
I need your help.
I have a rhel server that runs application, that application writing to her local application log.
I want that log will be realtime copying to a another remote rhel server.
The thing is that I prohibited touch the application code.
Is that possible?
... (5 Replies)
Discussion started by: moshesa
5 Replies
10. Shell Programming and Scripting
I'm having a strange problem with basic >& output redirection to a simple log file in csh. When I run this particular output redirection on the command line, it works, but then when I run the same output redirection command >& in my c shell script, I get a blank log file. Nothing is output to the... (5 Replies)
Discussion started by: silencio
5 Replies
LEARN ABOUT OPENSOLARIS
grablogs.conf
grablogs.conf(4) File Formats grablogs.conf(4)
NAME
grablogs.conf - grablogs configuration for libgrablogs.so of the plugins of
gnome-system-log file
SYNOPSIS
/usr/lib/gnome-system-log/plugins/grablogs.conf
DESCRIPTION
The libgrablogs.so is a plugin for gnome-system-log(1), it colloct the log files from the system as many as possible. grablogs.conf is a
configuration file that contains a set of lines mixed with sh(1) syntax codes and individual
log files. libgrablogs.so will read the file try to get a log files list for
gnome-system-log(1). Users can copy the file into $HOME/.gnome2/gnome-system-log/plugins/`uname -p` to overwrite the system default one.
The grablogs.conf file contains the following configuration categories:
[configs]
Each line under this category is interpreted as a config file of System. The plugin will open the config file and try to find
all system paths of the logs.
[commands]
Each line under this category is interpreted as a shell command and will be execute through a pipe. And each line of the out-
put of the command will be interpreted as a log path.
[logs] Each line under this category is interpreted as a log path.
FILES
/usr/lib/gnome-system-log/plugins/grablogs.conf
The system default configuration file for the plugin libgrablogs.so
$HOME/.gnome2/gnome-system-log/plugins/`uname -p`/grablogs.conf
The user specific configuration file for the plugin libgrablogs.so
EMAMPLE
[configs]
/etc/syslog.conf
[commands]
for i in `svcs -aH -o FMRI | grep -v lrc `; do svcprop -p restarter/logfile $i 2>/dev/null || svcprop -q -p restarter/alt_logfile $i
2>/dev/null ; done
[logs]
/var/log/messages
/var/log/secure
/var/log/maillog
/var/log/cron
/var/log/Xorg.0.log
/var/log/XFree86.0.log
/var/log/auth.log
/var/log/cups/error_log
SEE ALSO
gnome-system-log(1), pipelog.conf(1)
gnome-utils 2.16.0 13 Oct 2006 grablogs.conf(4)