Sponsored Content
Top Forums Shell Programming and Scripting Different cmd to execute and based on some pattern parse it and then store result in xlx format Post 302757725 by Sanjeev Roy on Friday 18th of January 2013 01:04:30 AM
Old 01-18-2013
Linux 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

How to get a result of a cmd into variable?

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

awk to output cmd result

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

How to execute nohup cmd

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

How to store result of grep into a variable?

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

Telnet using port and execute cmd

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

Execute command using ssh server 'cmd'

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

awk to parse file and display result based on text

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

Store result variable

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

How to parse .nessus file to get result in human readable format?

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

Search a multi-line shell command output and execute logic based on result

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
GNOTE(1)						       GNOME User's Manuals							  GNOTE(1)

NAME
gnote - A simple note-taking application for Gnome SYNOPSIS
gnote [OPTION] ... DESCRIPTION
This manual page documents briefly the gnote command. Gnote is a desktop note-taking application for Linux and Unix. Simple and easy to use, but with potential to help you organize the ideas and information you deal with every day. Gnote's usefulness lies in the ability to relate notes and ideas together, using a WikiWiki-like linking system. When run without any options, either a Search All Notes window or the Gnote note menu appears in the notification tray area depending on configuration. Selecting a note from a list in Search All Notes or from the menu from notification area displays the note's spatial win- dow. Changes to notes are saved automatically. Links to URLs, files, and other notes are detected as you type. Rich editing such as highlight- ing, bold, italics, undo/redo, and variable font sizes are supported. Global keybindings exist to allow fast access to Gnote notes and dialogs. These keybindings are set in GConf (see below) and may be acti- vated from any application. OPTIONS
The program follows the usual GNU command line syntax, with options starting with two dashes (`--'). A summary of options are included below. --new-note Create and display a new note. --new-note TITLE Create and display a new note with the title given. --open-note TITLE/URL Display the existing note matching TITLE or URL. --start-here Display the "Start Here" note. --highlight-search TEXT Search and highlight TEXT in the opened note. --help Show summary of options. --version Show version of program. GCONF SETTINGS
Gnote has several preference settings stored in GConf. Changes to Settings are applied instantly to any running Gnote instance. A summary of the GConf settings and their purpose are described below. /apps/gnote/global_keybindings/open_start_here Global X keybinding for displaying the "Start Here" note. The default keybinding is <Alt>F11. /apps/gnote/global_keybindings/show_note_menu Global X keybinding for displaying the Gnote applet's note menu. The default keybinding is <Alt>F12. /apps/gnote/global_keybindings/create_new_note Global X keybinding for creating and displaying a new note. /apps/gnote/global_keybindings/open_recent_changes Global X keybinding for opening the recent changes dialog. /apps/gnote/global_keybindings/open_search Global X keybinding for opening the note search dialog. SEE ALSO
http://live.gnome.org/Gnote/ BUGS
Please enter bug reports in the Gnome Bugzilla bug tracker (http://bugzilla.gnome.org/enter_bug.cgi?product=Gnote). AUTHOR
Hubert Figuiere <hub@figuiere.net> This manual page was originally written by Luca Capello <luca@pca.it>. Adapted to Gnote by Hubert Figuiere gnome April 7, 2009 GNOTE(1)
All times are GMT -4. The time now is 06:04 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy