01-18-2013
Different cmd to execute and based on some pattern parse it and then store result in xlx format
Hi
I have a different requirement,
I need to run some application on my device from a file app_name.txt one by one which is like this:
/usr/apps/email
/usr/apps/message
/usr/apps/settings
after each app while it is running I need to execute again one cmd like
ps -ef |grep /usr/apps/email
then this cmd will give output like this:
user 6423 6602 0 11:23 pts/4 00:00:00 /usr/apps/email
on this output I need to extract the 2nd, 3rd and last column value only and store it to another excel format file(result.xls) whose format will be like:
/usr/apps/email 6423 6602 13025 (sum of the 2 column value)
This all will be executed like same for all other app name from the file app_name.txt
please help me for this script as I am new to this and dont have much idea abt cmds of shell script.
10 More Discussions You Might Find Interesting
1. UNIX and Linux Applications
Hi ,
I am trying following .
I need to get a result of an autosys cmd into a unix variable.
The autosys cmd is
autostatus -G jpm_day_today
Please help me in storing the value returned by this cmd into a unix variable.
Appreciate your time to read this post. (1 Reply)
Discussion started by: manchau
1 Replies
2. HP-UX
I was wondering if it was possible to tell awk to print the output of a command in the print.
.... | awk '{print $0}'
I would like it to print the date right before $0, so something like (this doesn't work though)
.... | awk '{print date $0}' (4 Replies)
Discussion started by: IMTheNachoMan
4 Replies
3. Linux
Hi,
nohup sar -u 10 $COUNT | awk 'NR>2 {$2=$4=$7="";}1' | tr -s ' ' '\t' 2>/dev/null >sar.out &
i have execute above line from shell script .. but sar.out is created with ZERO bite size..
Help on that what is the problem here
Thx,
Mani (0 Replies)
Discussion started by: Mani_apr08
0 Replies
4. Shell Programming and Scripting
In a directory i have a file *output* whose contents are changing for every simulation.
zgrep "trace file is" *output* | zgrep g
o/p: trace file is Int_01.1352176388z4f56ec33.0.trace.gz
I want to extract "Int_01.1352176388z4f56ec33.0.trace.gz" from the above result into a variable.
i... (2 Replies)
Discussion started by: twistedpair
2 Replies
5. Shell Programming and Scripting
Hi,
my query is:
I am Login on server with IP xxx.xxx.xxx.xxx.. and i want a script where
i want to telnet to server with IP yyy.yyy.yyy.yyy using specific port and then execute a cmd there on server Y
please suggest (1 Reply)
Discussion started by: dodasajan
1 Replies
6. Shell Programming and Scripting
Hi
The command below does not work as it require to take command in the breakers
But If I do so the variable values get lost
ssh testserver01 'dsmc q b "${ARCHIVE_DIR}*" -sub=yes -querysummary -inactive -fromd="${BACKUP_DATE}"'
Thank you. (3 Replies)
Discussion started by: zam
3 Replies
7. Shell Programming and Scripting
I am trying using awk to open an input file and check a column 2/field $2 and if there is a warning then that is displayed (variantchecker): G not found at position 459, found A instead. The attached Sample1.txt is that file. If in that column/field there is a black space, then the text after... (6 Replies)
Discussion started by: cmccabe
6 Replies
8. Shell Programming and Scripting
Friends have the following problem:
cat $PATH_DAT/mr.txt | nawk 'BEGIN {
CantPnt=0;
NumReg=0;
FS="|"
}
{
NumReg++
CantPnt=CantPnt+int($2)
}
END{
printf... (5 Replies)
Discussion started by: tricampeon81
5 Replies
9. Programming
Scripting Language: bash shell script, python
I want to parse .nessus file in human readable format. If any one have any ideas please help me. (2 Replies)
Discussion started by: sk151993
2 Replies
10. UNIX for Beginners Questions & Answers
The following is a multi-line shell command example:
$cargo build
Compiling prawn v0.1.0 (/Users/ag/rust/prawn)
error: failed to resolve: could not find `setup_panix` in `human_panic`
--> src/main.rs:14:22
|
14 | human_panic::setup_panix!();
| ... (2 Replies)
Discussion started by: yogi
2 Replies
TALAGENT(8) BSD System Manager's Manual TALAGENT(8)
NAME
talagent -- helper agent for the Transparent App Lifecycle feature.
SYNOPSIS
talagent [command [arguments]]
DESCRIPTION
The talagent daemon provides services related to the Transparent App Lifecycle feature. talagent may also be run manually as a command line
tool to output information about persistent state.
The options are as follows:
-help
Outputs usage information.
-dump bundle_id_fragment
Outputs the persistent state of an application whose bundle ID contains the given fragment, case insensitive ("textedit" for example).
You may also pass a path directly to the app's persistent state directory, usually in ~/Library/Saved Application State.
-launch bundle_id
This launches an app (in this case, TextEdit) in a manner approximating how apps get launched at login. You can pass either a bundle ID
fragment or a path to an app. The app is maintained stopped until you hit return in the launching window (or until it receives SIGCONT).
This is the easiest way to test the login scenario without needing to log in.
-casinfo [ASN]
With no arguments, outputs summary information about all apps. With one argument (an ASN), outputs the CAS record for that app.
-memory_pressure
Simulates memory pressure, which may cause apps that support automatic termination to exit. This does not actually allocate any memory.
-refresh_encryption
Rotates the bitmap encryption key, and attempts to cross-encrypt all existing window bitmaps under the new key. This is done periodically
by talagent.
HISTORY
First appeared in Mac OS X 10.7
Mac OS X September 1, 2010 Mac OS X