Advertisement

635 organizations, including eBay, Ericsson and Lockheed Martin, now work smarter with Corporate Accounts. Save up to 42%

 

Welcome! If you have any general questions about Experts Exchange, feel free to ask me.

 
Top Unix Systems Programming Solutions: 1 - 25 of 37
 
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...
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 ...
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...
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) ...
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 ...
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...
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 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...
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...
#!/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 ?..
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...
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....
Hi, Our Company is using Clear Case as version control system. But now we have to migrate the repository to CVS. I want to know is there any way  to do such kind of migration and how effectiv...
I want to know how to read the path column from one of the CSV file in unix ?
Before I create my own utility in Java I wanted to reach out to some UNIX people to see if this may already exist with commands. I am a novice when it comes to UNIX and scripting but for this ...