Search Results

Search: Posts Made By: on9west
4,554
Posted By on9west
How to provide stdin from one script to another script?
Dear all

I have a scripts call "script.sh", that I need to provide 3 params from stdin
i.e.

# script.sh

Please input first name : Hello
Please input last name : Kitty
Please input sex : F...
7,612
Posted By on9west
Script for checking firewall connection
Dear all

I am writing a shell script to use telnet for the connection test

There are 3 cases to test and detail as:

/* Case 1 - The port can be connected */
# telnet host_a 20101 <...
7,327
Posted By on9west
Extract XML message from a log file using awk
Dear all

I have a log file and the content like this

file name: temp.log


<?xml version="1.0" encoding="cp850"?>

<!DOCTYPE aaabbb SYSTEM '/dtdpath'>

<aaabbb>
<tranDtl>
...
Forum: Programming 10-14-2009
4,777
Posted By on9west
C Compilation problem
Dear all

I am new to C programming

In response to the post (https://www.unix.com/high-level-programming/1991-time-microseconds-3.html)

cat get_time.c

#include <stdlib.h>
#include...
10,878
Posted By on9west
How to tar all executable file in a directory
Dear all

I want to create a tar file which contains all executable files in a specific directory

cd /appl/home/
file some_exe
some_exe: 64-bit XCOFF executable or object module not stripped
...
3,246
Posted By on9west
Thank you for your help I google to study...
Thank you for your help

I google to study what the RS= is. It is to breaks up the line into fields.

However, if my interfaces.txt like this (do not have blank line seperated). How to do then?
...
4,847
Posted By on9west
Find with RegEx
I have some files in unix


ls -1

TMH.backend.tar.421E-03.Z
TMH.backend.tar.421E-04.Z
TMH.backend.tar.421E-05.Z
TMH.backend.tar.421E-06.Z
TMH.backend.tar.421E-07.Z...
3,246
Posted By on9west
how to extract info from a file using awk
Dear all

I have a file call interfaces.txt

Filename: interfaces.txt


How can I extract the information at below?
ABC_DB_001 hostname1 20901
ABC_DB_002 hostname2 20903
ABC_DB_003...
12,273
Posted By on9west
Here is my `ps auxw` output USER PID...
Here is my `ps auxw` output

USER PID %CPU %MEM SZ RSS TTY STAT STIME TIME COMMAND
root 16680 5.9 0.0 384 384 - A May 29 112986:18 wait
root 288 5.8...
12,273
Posted By on9west
Thanks for reply. However, it does not work `ps...
Thanks for reply. However, it does not work `ps auxwww | awk 'NR==1{OFS=" ";$1=$1;print;next}{OFS=" | ";$1=$1;print}'`

Furthermore, could you explain the code meaning? I don't really understand....
12,273
Posted By on9west
Problem in getting the ps information with field separator
Dear all

I have the following problem that want to have your advices.
I want to capture the `ps auxwww | head -30` image with field separator (|) in my script

My expect output
USER PID...
6,191
Posted By on9west
It really help. Thanks for your hints.
It really help.

Thanks for your hints.
6,191
Posted By on9west
How to know who executed a script?
Dear all

I would like to capture who executed a script to a script's variable (i.e. testing.sh), so I can save it to a log file.

testing.sh
#! bin/ksh

user=`<< code here >>` // get the info...
Forum: AIX 05-21-2008
9,501
Posted By on9west
You may try this ps auxwww | grep...
You may try this

ps auxwww | grep <your_pid>
8,177
Posted By on9west
Replace text in multiple files
Dear all

My task is to replace a strings in multiple files.

filename: file1


I can use sed to replace abc.server.com to unix.server.org
e.g. sed 's/abc.server.com/unix.server.org/g file1 >...
2,690
Posted By on9west
Format disorder after email with attachment
Hello

My script is to email a textfile(abc) in unix. I open abc.txt using window notepad. All the "Enter Key"(line break) are found missed. However, it is no problem using window wordpad.
...
5,078
Posted By on9west
Search for a word
I would like to retrieve the word from the following file

filename abc.txt
------------------------------------------------------------------
Deadlock Id 28418: Process (Familyid 0, Spid 140)...
Showing results 1 to 17 of 17

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