In Mac OSX terminal I need to run a program against multiple files in a directory and append the output to tab separated variable file.
I currently type the following to process just one file
My program and all the files I want to process are in the SFT directory in this example. I want to be able to carry out this process against all of my files in one go rather than one at a time. Please can anyone suggest a command or simple script to achieve this.
As I am sure you can tell I am a complete novice at this.
How do I make the below ksh to process all of the files inside a user specified directory?
Currently it can only process one file at a time.
#!/bin/ksh
tr -s '\11 ' ' ' < $1 > temp0
sed -e 's/,//g' temp0 > temp1
cut -d' ' -f1,4,5 temp1 > final_output
rm temp0 temp1 (3 Replies)
Hi All,
Please explain me when i have to use multiple process and when I have to use Multiple threads? Please give me an example.It will be very helpful for me.
Thanks in advance. (0 Replies)
Hi all,
I'm writing a program using libpcap, and I have multiple pcap files in a folder that I want to capture.
I currently have
handle = pcap_open_offline("/data/traffic/pcap1.pcap", errbuf");
which works fine since pcap_open_offline() takes in a filename. However, I want to process... (0 Replies)
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)
Hi,
I would like to write a for loop that does the following:
I have a file called X.txt and other files called 1.txt,2.txt, .....,1000.txt.
I want to substitute the 6th column of the file X.txt with 1.txt and store the output as X.1. Then I want to do the same with X.txt and 2.txt and store... (0 Replies)
I have multiple input files that I want to manipulate using a shell script. The files are called 250.1 through 250.1000 but I only want the script to manipulate 250.300 through 250.1000. Before I was using the following script to manipulate the text files:
for i in 250.*; do
|| awk... (4 Replies)
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)
Hi,
I have a requirement to process multiple files in a directory parallely.Consider the below scenario:
In a directory there are three files file1,file2 and file3.When I use for loop each file will be executed in sequence but I want to process parallely.
Any Help would be appreciated.... (1 Reply)
Hi there, I'm camor and I'm trying to process huge files with bash scripting and awk.
I've got a dataset folder with 10 files (16 millions of row each one - 600MB), and I've got a sorted file with all keys inside.
For example:
a sample_1 200
a.b sample_2 10
a sample_3 10
a sample_1 10
a... (4 Replies)
I am running the below loop that to process the 3 bam files (which isn't always the case). A .py executable is then called using | xargs sh to further process. If I just run it with echo the output is fine and expected, however when
| xargs sh is added I get the error. I tried adding | xargs... (4 Replies)
Discussion started by: cmccabe
4 Replies
LEARN ABOUT OSX
plutil
PLUTIL(1) BSD General Commands Manual PLUTIL(1)NAME
plutil -- property list utility
SYNOPSIS
plutil [command_option] [other_options] file
...
DESCRIPTION
plutil can be used to check the syntax of property list files, or convert a plist file from one format to another. Specifying - as an input
file reads from stdin.
The first argument indicates the operation to perform, one of:
-help Show the usage information for the command and exit.
-p Print the property list in a human-readable fashion. The output format is not stable and not designed for machine parsing. The
purpose of this command is to be able to easily read the contents of a plist file, no matter what format it is in.
-lint Check the named property list files for syntax errors. This is the default command option if none is specified.
-convert fmt Convert the named file to the indicated format and write back to the file system. If the file can't be loaded due to invalid
syntax, the operation fails.
fmt is one of: xml1, for version 1 of the XML plist format binary1, for version 1 of the binary plist format json, for the
JSON format
There are a few additional options:
-- Specifies that all further arguments are file names
-s Don't print anything on success.
-r For JSON, add whitespace and indentation to make the output more human-readable.
-o path Specify an alternate path name for the result of the -convert operation; this option is only useful with a single file to be
converted. Specifying - as the path outputs to stdout.
-e extension Specify an alternate extension for converted files, and the output file names are otherwise the same.
DIAGNOSTICS
The plutil command exits 0 on success, and 1 on failure.
SEE ALSO plist(5)STANDARDS
The plutil command obeys no one's rules but its own.
HISTORY
The plutil command first appeared in Mac OS X 10.2.
Mac OS X August 30, 2002 Mac OS X