Search Results

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

or trap sig_handler SIGTERM
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.
Posted By jyotipg
Cleaning the content of log files

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....
Posted By jyotipg
Substituting with value of variable in Sed

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

Code Snippet:

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

When I...
Posted By jyotipg
how to type "^C" in VI editor

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
Posted By jyotipg
converting contents of a character array to int

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...
Posted By jyotipg
Perl program to read from multiple files

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:
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??
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...
Posted By jyotipg
Passing exit status to an exit_handler

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

Here is my code:

trap 'exit_handler ' EXIT

print -u2 "inside the...
Posted By jyotipg
Writting to multiple file

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...
Posted By jyotipg

thanks for your help..

Google's rotate script needs some correction..

Here is the corrected "case" statement:

case $TCOUNT in
"1") echo '-'"\b\c"
Posted By jyotipg
writing a timer

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...
Posted By jyotipg
Thanks.. That works great....
Posted By jyotipg
Printing output to the monitor

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...
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..:)
Posted By jyotipg
You may want to use: comm file1 file2
You may want to use:

comm file1 file2
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.

if [ "$SUFFIX" = "${SRF}" ]; then
Posted By jyotipg
comparing timestamp of two files

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...
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...
Posted By jyotipg
new maths??
Hi! Perderabo,

Excellant Analysis..
Posted By jyotipg
Creating a hash table using shell script

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...
Posted By jyotipg
Linux file corresponding to HP-UX inetd.conf

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
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???

Posted By jyotipg
The OS used in HP-UX-11.0 and the shell is ksh
Showing results 1 to 25 of 95


Featured Tech Videos

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