Sponsored Content
Special Forums UNIX Desktop Questions & Answers One output into multiple different files Post 302439655 by Franklin52 on Friday 23rd of July 2010 08:38:11 AM
Old 07-23-2010
You can do something like this with awk:
Code:
your_application |
awk '
/pattern1/{print > "file_with_pattern1"}
/pattern2/{print > "file_with_pattern2"}
' > file_with_other_lines

This User Gave Thanks to Franklin52 For This Post:
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

directing output to multiple files

I have a script in which some outputs are directed to one file echo "Load Started" >>${LOGFILE1} If I have another file LOGFILE2 and i want to redirect the output of the above echo command to LOGFILE2 as well with the same command line... how can i do that? Thanks (2 Replies)
Discussion started by: cobroraj
2 Replies

2. UNIX for Dummies Questions & Answers

Using AWK: Extract data from multiple files and output to multiple new files

Hi, I'd like to process multiple files. For example: file1.txt file2.txt file3.txt Each file contains several lines of data. I want to extract a piece of data and output it to a new file. file1.txt ----> newfile1.txt file2.txt ----> newfile2.txt file3.txt ----> newfile3.txt Here is... (3 Replies)
Discussion started by: Liverpaul09
3 Replies

3. Shell Programming and Scripting

Output in multiple files

I'm trying to use following syntax to get output in multipe lines. but its not working.. df -h | awk '{print $1}' > tee -a nss1 nss2 nss3 can any1 please tell me how can i get required output in multiple files. I also tried this syntax but in that way i get output only in nss2 file. ... (4 Replies)
Discussion started by: kashif.live
4 Replies

4. Shell Programming and Scripting

awk, multiple files input and multiple files output

Hi! I'm new in awk and I need some help. I have a folder with a lot of files and I need that awk do something in each file and print a new file with the output. The input file name should be modified when I print the outpu files. Thanks in advance for help! :-) ciao (5 Replies)
Discussion started by: gabrysfe
5 Replies

5. Shell Programming and Scripting

Create Multiple UNIX Files for Multiple SQL Rows output

Dear All, I am trying to write a Unix Script which fires a sql query. The output of the sql query gives multiple rows. Each row should be saved in a separate Unix File. The number of rows of sql output can be variable. I am able save all the rows in one file but in separate files. Any... (14 Replies)
Discussion started by: Rahul_Bhasin
14 Replies

6. Shell Programming and Scripting

[Solved] Multiple input files and output files

Hi, I have many test*.ft1 files to which I want to read as input for a script called pipe2txt.tcl and print the output in each separate file. For example, pipe2txt.tcl < test001.ft1 > test001.txt How can I read many files in this maner? thank you very much, Best, Pahuja (5 Replies)
Discussion started by: Pahuja
5 Replies

7. Shell Programming and Scripting

Grep strings on multiple files and output to multiple files

Hi All, I want to use egrep on multiple files and the results should be output to multiple files. I am using the below code in my shell script(working in Ksh shell). However with this code I am not attaining the desired results. #!/bin/ksh ( a="/path/file1" b="path/file2" for file in... (4 Replies)
Discussion started by: am24
4 Replies

8. Shell Programming and Scripting

Output Multiple Files in the For Loop

while IFS= read -r line do # sV for version detection nmap -T4 -Pn -v -sS "$line" > "text/$line" done < <(grep '' $file) Hi, where line represents the IP. I am using NMAP to do scanning. How can I set to execute that command in the loop several concurrently at a time instead of one... (5 Replies)
Discussion started by: alvinoo
5 Replies

9. Shell Programming and Scripting

SBATCH trinity for multiple files and rename/move the output files

Hey guys, I have wrote the following script to apply a module named "trinity" on my files. (it takes two input files and spit a trinity.fasta as output) #!/bin/bash -l #SBATCH -p node #SBATCH -A <projectID> #SBATCH -n 16 #SBATCH -t 7-00:00:00 #SBATCH --mem=128GB #SBATCH --mail-type=ALL... (1 Reply)
Discussion started by: @man
1 Replies

10. Shell Programming and Scripting

Execute multiple files in multiple folders and also output on same folder

How to execute multiple files in multiple folders and also output to be generated in the same folder? Hello Team, I have a path like Sanity_test/*/* and it has around 100+ folders inside with files. I would like to run/execute those files and output of execution to be placed on same /... (1 Reply)
Discussion started by: pushpabuzz
1 Replies
gnome-desktop-item-edit(1)					   User Commands					gnome-desktop-item-edit(1)

NAME
gnome-desktop-item-edit - GNOME Desktop file editor SYNOPSIS
gnome-desktop-item-edit [--create-new] filename DESCRIPTION
gnome-desktop-item-edit is the GNOME Desktop file editor, which you can use to create or edit the .desktop (known as desktop) file. GNOME uses a standard desktop file specification as proposed by freedesktop.org. A desktop file consists of a number of name-value pairs that define how a desktop should organize a particular application. As this is defined as an open standard, integration of applications into GNOME Desktop is relatively straightforward. A basic entry in the desktop file must start with a tag called [Desktop Entry]. It can then have a number of name-value pairs as defined by the standard. The minimum entries are as follows: Name the name of the application Comment a textual description of the application which is displayed as a tooltip message by gnome-panel. When set appropri- ately, the comment can be localized within the same file. Exec the name of the actual executable Icon the file name of the icon image Type the desktop file type Categories a multi-string field which is used by gnome-panel to group applications into the appropriate categories. These desktop files provide the information to gnome-panel, which places the application in the appropriate locations on the panel. In a similar manner, the GNOME file manager (Nautilus) uses information from the desktop files to display the 'applications:///' view. OPTIONS
The following options are supported: --create-new Creates a new .desktop file. OPERANDS
The following operands are supported: filename The name of the desktop file to be edited or viewed. EXAMPLES
Example 1: Editing an existing .desktop file example% gnome-desktop-item-edit fullpath/filename This command invokes the launcher dialog and loads the contents of the specified desktop file into the relevant fields. EXIT STATUS
The following exit values are returned: 0 Application exited successfully >0 Application exited with failure FILES
The following files are used by this application: /usr/bin/gnome-desktop-item-edit Executable for GNOME Desktop file editor /usr/share/applications/ Location of system desktop files ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Availability |SUNWgnome-panel | +-----------------------------+-----------------------------+ |Interface stability |Volatile | +-----------------------------+-----------------------------+ SEE ALSO
gnome-panel(1), nautilus(1), attributes(5) Latest version of the GNOME Desktop User Guide for your platform. NOTES
Written by Ghee Teo, Sun Microsystems Inc., 2003. SunOS 5.11 2 Oct 2003 gnome-desktop-item-edit(1)
All times are GMT -4. The time now is 12:33 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy