Search Results

Search: Posts Made By: jyotipg
75,879
Posted By jyotipg
trap sig_handler 15 or trap sig_handler...
trap sig_handler 15

or trap sig_handler SIGTERM
8,253
Posted By jyotipg
Signal HUP is generated when the terminal on...
Signal HUP is generated when the terminal on which the process is running gets disconnected.

You may get this message depending on the network conditions and how you run thsi script.
4,369
Posted By jyotipg
Cleaning the content of log files
Hi,

I am facing problems while trying to clean a log file(Means making its file Size zero).
I am not the owner of this file. From the command line, I can clean it by becoming a Sudo....
4,020
Posted By jyotipg
Substituting with value of variable in Sed
Hi,

I have a program in which i have to substitute a TAG in a file with the value of a variable.

Code Snippet:
----------------
myvar=1234

sed 's/_TAG_/$myvar/' infile outfile

When I...
9,957
Posted By jyotipg
how to type "^C" in VI editor
Hi,

this is intersting.. how do I type control-C (it appears as ^C) in VI editor.

The problem is that on typing this key combination, there is signal sent to the vi editor and i get a message...
Forum: Programming 07-19-2006
18,493
Posted By jyotipg
converting contents of a character array to int
Hi,

I have character array and i need to convert the content to int.

program snipet:

char array[10] = {"1","2","3","4","5","6","7","8","9"}.

I need to to extract each of these array...
19,780
Posted By jyotipg
Perl program to read from multiple files
Hi,

I need to generate a test data file by reading inputs from multiple files.

A sample pseudo code for this program to read from three files and write to a output file would be like:
...
4,577
Posted By jyotipg
how to automate sudo
I have to provide a password everytime I invoke a script with Sudo privileges.
How can I avoid it??
Is it possible to automate Sudo so that I dont have to pass a password everytime??
4,410
Posted By jyotipg
getting the date fields in Perl
I get the perl date in the following format:

Mon Jan 31 06:01:37 2005

How can I extract each field in a single line using a regular expression??

I dont want to use "split".

Any other way...
4,835
Posted By jyotipg
Passing exit status to an exit_handler
Hi!,

I have a exit_handler to do post-processing when the programs exits with some value.

Here is my code:

trap 'exit_handler ' EXIT

exit_handler()
{
status=$?
print -u2 "inside the...
1,798
Posted By jyotipg
Writting to multiple file
Hi!,

My script generates a lot of files while running.. The same output at any point may be diercted to some of them..

if I have 4 files file1 file2 file3 file4,

echo "output" to file1 file2...
4,866
Posted By jyotipg
Thanks..
Folks,

thanks for your help..

Google's rotate script needs some correction..

Here is the corrected "case" statement:

case $TCOUNT in
"1") echo '-'"\b\c"
sleep $INTERVAL
;;...
4,866
Posted By jyotipg
writing a timer
Hi!,

My shell script takes a quite a long time to execute.. Nothing appears on the screen during this period.. User are left guessing... whats going on????????????

Any ideas on how to create a...
3,555
Posted By jyotipg
:)
Thanks.. That works great....
3,555
Posted By jyotipg
Printing output to the monitor
Hi!,

In my shell scripts, I always create a logfile by adding the following line in the beginning:

exec >file.log 2>&1

This in turn directs all the output to this logfile till the script...
21,113
Posted By jyotipg
netrc forces you to set the permissions of .netrc...
netrc forces you to set the permissions of .netrc file to 400. So, no one can see this other than you.. assuming root is non-intrusive..:)
2,053
Posted By jyotipg
You may want to use: comm file1 file2
You may want to use:

comm file1 file2
3,313
Posted By jyotipg
Whats does this mean
Found this piece of code written in ksh. I have no ideas what do the stuff like ${SRF##*\.} do.


SUFFIX=${SRF##*\.}
if [ "$SUFFIX" = "${SRF}" ]; then
SUFFIX=""
...
16,808
Posted By jyotipg
comparing timestamp of two files
Hi!

I need to copy a whole bunch of file from a build directory to my working directory. Many of these files already exist in my working directory. I need to copy only those files that have been...
6,673
Posted By jyotipg
original post by kelas_magnum ...
original post by kelas_magnum
===========================
also, 1746 + 999 = 2745, not 2748 You had that right in your previous post... +2 bytes for the command "l " gives you 2747... which was...
6,673
Posted By jyotipg
new maths??
Hi! Perderabo,

Excellant Analysis..
51,096
Posted By jyotipg
Creating a hash table using shell script
Hi,

For one of my programs, I need to have a hashtable as in Perl. Unfortunately shell doesnt provide any variable like hash. Is there anyway/trick, I could implement a hash in shell (using shell...
6,092
Posted By jyotipg
Linux file corresponding to HP-UX inetd.conf
Hi!!,

I have been working on a HP UX box all these days.. For adding a user defined service, I used to put an entry for this service corresponing to a port number in /etc/services. These services...
Forum: Programming 08-08-2003
7,575
Posted By jyotipg
GDB or DBX??
Which is better??

I have always been a gdb fan.. But ppl say dbx is beter better for debugging the core.. Do all GDB lovers agree to it???

:cool:
5,975
Posted By jyotipg
....
The OS used in HP-UX-11.0 and the shell is ksh
Showing results 1 to 25 of 95

 
All times are GMT -4. The time now is 03:50 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy