Search Results

Search: Posts Made By: Perderabo
Forum: Programming 07-29-2002
151,469
Posted By Perderabo
Try this...#include <stdlib.h> #include...
Try this...#include <stdlib.h>
#include <sys/time.h>
main()
{
struct timeval tv;
struct timezone tz;
struct tm *tm;
gettimeofday(&tv, &tz);
tm=localtime(&tv.tv_sec);...
11,138
Posted By Perderabo
And in ksh: #! /usr/bin/ksh while read...
And in ksh:

#! /usr/bin/ksh
while read line ; do
set -s +A words $line
echo ${words }
done
exit 0
35,128
Posted By Perderabo
There is not much to know about controlling a...
There is not much to know about controlling a process. Stevens' book covered it all, so you are already there. I don't even know what "job control" is supposed to mean...process groups perhaps? ...
133,138
Posted By Perderabo
Well, I don't understand this thread. First of...
Well, I don't understand this thread. First of all:$ set -A array "one two three four"
$ echo ${array[0]}
one two three four
$so the command given in the OP results in an array with a single...
30,483
Posted By Perderabo
You could use pax: pax -r -s '=^/opt/abc=/tmp='...
You could use pax:
pax -r -s '=^/opt/abc=/tmp=' < tarfile
Forum: Cybersecurity 03-22-2011
32,115
Posted By Perderabo
Opps! Sorry ArcAngel, I had not noticed your...
Opps! Sorry ArcAngel, I had not noticed your report before. Better late than never I guess. :o There is no X4, it only goes up to X3. The fix was to remove "!X4 && " from that line. Actually,...
Forum: Cybersecurity 12-18-2004
32,115
Posted By Perderabo
swordfish --- a password generator
Here is my new password generation script. The attachment, swordfish.txt, is in dos format. Remember that you need to use dos2unix or flip or something to get it into unix format.

The script is...
Forum: How do I send email? 02-26-2002
41,656
Posted By Perderabo
I had to write a script on HP-UX that would send...
I had to write a script on HP-UX that would send an ascii file as a mime attachment but in such a way that a non mime mailer could read it. This was to satisfy all of our customers at once. Here...
47,480
Posted By Perderabo
They are other integers that relate to files. ...
They are other integers that relate to files. Some programs are too complex to fit into a stdin/stdout model. Some scripts simply need more stuff as well. A contrived example:

exec 3> john.out...
11,288
Posted By Perderabo
I really have to agree with cfajohnson. Putting...
I really have to agree with cfajohnson. Putting sed in a loop where you process, say, 50,000 records means that your script must fork() and exec() 50,000 times. And that's assuming that you limited...
123,646
Posted By Perderabo
Try this...typeset -Z6 number number=9 echo...
Try this...typeset -Z6 number
number=9
echo $number
((number=number+1))
echo $number
exit 0
10,827
Posted By Perderabo
I would not cat the new certificate onto the end...
I would not cat the new certificate onto the end of the old certificate. I would rename the old certificate to a save file. Then I would just move the new certificate in place.
10,627
Posted By Perderabo
The Thompson goto command was bizarre because it...
The Thompson goto command was bizarre because it was not a shell built-in. It was actually an external command. Decisions like this were made to get the thing to run in a 16 bit machine.

First...
4,330
Posted By Perderabo
On my mgetty man page I see: -m...
On my mgetty man page I see:

-m 'expect send ...'
Set the "chat sequence" that is used to initialize the modem. For an empty expect part, use empty double
...
Forum: Solaris 09-03-2014
4,973
Posted By Perderabo
Things are changing all the time. If you run...
Things are changing all the time. If you run prstat then you run ps you get two differtent snapshots of memory. Even if you run them more or less simultaneously they will not examine the processes...
4,849
Posted By Perderabo
The "let" command originated in ksh. Dave Korn...
The "let" command originated in ksh. Dave Korn considered it to be a mistake and very quickly developed the double parentheses notation to replace it. By the mid 1980's the advice was to not use...
Forum: Linux 08-20-2014
4,209
Posted By Perderabo
Try this: in modprobe.d create a new file called...
Try this: in modprobe.d create a new file called 8021q. In it, put the lines:
install 8021q /bin/true
install garp /bin/true


This tells the kernel to use non-standard versions of 8021q and...
2,728
Posted By Perderabo
Well, see this thread...
Well, see this thread (https://www.unix.com/tips-and-tutorials/36711-whole-story-usr-bin-ksh.html) especially "Part 2 The Format of the #! Line"
Forum: Linux 08-19-2014
3,645
Posted By Perderabo
Suppose it did that. There are still errors you...
Suppose it did that. There are still errors you can make that render sudo usuable like "chmod 0 /usr/bin/sudo". As a sysadmin you need to be ready for that and be able to operate when sudo fails....
2,728
Posted By Perderabo
See this thread...
See this thread (https://www.unix.com/unix-for-advanced-and-expert-users/243903-dot-sourcing-differences-ksh-aix-vs-linux-vs-solaris.html)
2,983
Posted By Perderabo
IMHO, the best book ever written on the subject...
IMHO, the best book ever written on the subject is: C Programmer's Guide to Serial Communications (http://www.amazon.com/C-Programmers-Guide-Serial-Communications/dp/0672302861/)
7,459
Posted By Perderabo
I am not really familiar with modern fortran. ...
I am not really familiar with modern fortran. But is not g++ a compiler for the C++ language? Maybe you should try a fortran compiler? To test my guess I wrote a little "hello world" program in...
2,728
Posted By Perderabo
ksh does indeed have a special way to deal with...
ksh does indeed have a special way to deal with child scripts that have no #! leading line. This introduces a number of special features that expands the traditional unix environment. These...
6,280
Posted By Perderabo
Read your putty documentation again. Chapter 9...
Read your putty documentation again. Chapter 9 describes using pagent to supply authentication. Once pagent is running you can do stuff like this:
C:\Windows\System32>
C:\Windows\System32>...
5,751
Posted By Perderabo
It's probably too late to help SkySmart, but I...
It's probably too late to help SkySmart, but I thought that I would post a followup anyway. In another thread I saw Corona688 perform date arithmetic via the -d parameter to date. This led me to...
Showing results 1 to 25 of 241

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