I have couple hundreds of UNIX machine, i need to change a user password remotely every 3 month. I don't have the admin privilege. What i do right now is, i log in through ssh into every syst...
Hi,
In the attached server.c and client.c code snippets, if I don't use
bzero,
then,
at the client side, some extra/strange characters appear at the end
of client.txt.
I want to know w...
I have a file that looks like this:
Mary=Ann
Ann=Mary
Fake=Fake
Joe=John
Doe=Doe
I want to find Fake=Fake and insert another line before it. This change then needs to be writte...
Dear All,
Am writing a shell script and using awk for special text processing from a file.
Can anyone of you tell me how to read and write to the same file using awk or sed? This is very ...
How do I force a carriage return when using mail in Linux or Unix? I've tried \n, \r, <\br> but these values just show up when I receive the email. The carriage returns show up if I hit the ...
Hi,
I want to copy my archive logs to another server through ftp. From the other server I want the archive logs to be gzipped and then copy the gzip files to a DR(disaster recovery server) ...
I have 100 files looking like this.
<html>
<body>
.....
</body>
</html>
---
I need to add the below line right above the <body> line in each of the above 100 files.
<SCRIPT LANGUAGE=...
Hi,
How can I make awk treat a double quoted data as one field only?
For example:
Input:
name, "street, country, zip", age, occupation
Output
$1 = name
$2 = street,...
I need to list the full paths to subdirectories within a given directory in Unix. Here's what I'm using to find the directories:
cd /usr/test
find * -type d
This give me the followi...
#!/bin/sh
#!/bin/stty
PATH=/notes/nep/:
PS1="alex: "
CDPATH=:$HOME
export PATH PS1 CDPATH
stty kill '^u'
===========================
-bash-3.2$ ./files.txt
./files.txt: line 8: st...
Hi Experts.
Need put in a cron job a script that checks for the db2 processes every 5 minutes and pages me when it is down?(when the process are down). Please can some one write executable...
Hi all,
i have this sed line below whcih is working fine.
echo "enter name"
read name
echo "enter shell"
read shell
sed -n "/$name/s/^\(.*:\).*$/\1$shell/p" /etc/passwd
The prob...
I can't find example in this site about reading from 2 pipes. One of the pipe will be read and the other pipe used for writing.
I understand in the c program, I will need to do the followi...
Hi,
I have a system where many guys have root access. I want to have a unix script that emails/alert me when some one writes or changes the /etc/hosts file.
I need to write a code that pass the output of "ls -l" back to parent using pipe. The ls- l will be executed by child after the fork process. Previously I succeeded in using fork() and execl t...
I'm looking for a good GUI - Crontab application to manage and monitor the Unix Crontab something like below link :
http://3d2f.com/programs/4-187-nncron-download.shtml
The process that I ...
Dear All,
I m trying to execute this command
X60=$(($1 * 60))
error showing : operand expected (error token is " * 60")
TOTMINUTES=$(($X60 / $2))
error : operand expected (error token i...
#!/bin/sh
#!/$ALEX:/usr/ucb:/usr/bin:/usr/sbin:/Users/alex/bin
ALEX=$ALEX:/usr/ucb:/usr/bin:/usr/sbin:/Users/alex/bin:
echo $ALEX
====================================================...
Experts,
I have a large file with many duplicates which i need to cleanse before i load it into the database to do some further ETL.
input file
---------------------------------
row ...
Hi,
I have posted a question few days ago for how to kick off a command (ssh $host "command...").
Someone suggest me to do the following:
#!/bin/sh
for host in `cat /list/of/hosts`
...
I am just curious on how to read the whole row in Unix using ksh ?..
I need to create a cshell program (UNIX) which should create a log for ftp connection successfull , imagine if i try to connect a non existent ip it should log the error unknown host , if su...
hi unix gurus!!!
im stumped on a simple solution for this.
for an/etc/hosts file that contains entries in format:
IPAddress <space> Hostname <newline>
Example:
127.0.0.1 localhost
169....
"Every process has one parent process. Parent process always has many child processes. and every child process can create another new child process which makes the first child process becomes ...
Rename dmp file and log files with database name and date - then put dmp and log files in another directory
I created the sa.dat file and sa_export.sh to export just one table every day in ...