Search Results

Search: Posts Made By: Perderabo
Forum: Programming 07-29-2002
156,072
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,703
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
38,708
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? ...
134,902
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,908
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
33,083
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
33,083
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
43,963
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...
48,192
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...
13,419
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...
125,630
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
12,205
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.
13,947
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,919
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
6,429
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...
5,742
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
5,417
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...
4,481
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
6,042
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....
4,481
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)
4,952
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/)
8,329
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...
4,481
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...
7,592
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>...
6,825
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 07:42 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy