07-16-2017
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi,
I have a problem in grepping a file for 2 strings and writing them to 2 appropriate files. I need to use the awk command and read the file only once and write to the appropriate file.
My file is very huge in size and it is taking a long time using cat command and grep command.
Can anyone... (3 Replies)
Discussion started by: m_subra_mani
3 Replies
2. Shell Programming and Scripting
Hi folks,
I am using the join command to join two files on a common field as follows:
File1.txt
Adsorption|H01.181.529.047
Adult|M01.060.116
Children|M01.055
File2.txt
5|Adsorption|C0001674
7|Adult|C000001
6|Children|C00002
join -i -t "|" -a 2 -1 1 -2 2 File1.txt File2.txt
This... (7 Replies)
Discussion started by: s0460205
7 Replies
3. Shell Programming and Scripting
On Solaris & AIX, suppose there is a directory 'dir'.
Log files of size approx 1MB are continuously being
deposited here by scp command. I have a script that scans
this dir every 5 mins and moves away the log files that
have been deposited so far.
How do I design my script so that I pick up... (6 Replies)
Discussion started by: sentak
6 Replies
4. Solaris
On Solaris, suppose there is a directory 'dir'.
Log files of size approx 1MB are continuously being
deposited here by scp command. I have a script that scans
this dir every 5 mins and moves away the log files that
have been deposited so far.
How do I design my script so that I pick up *only*... (6 Replies)
Discussion started by: sentak
6 Replies
5. UNIX for Dummies Questions & Answers
Hi everyone,
I have some large text files that I need to split into a specific number of files of equal size. As far as I know (and I don't really know that much :)) the split command only lets you specify the number of lines or bytes. The files are all of a different size, so the number of... (4 Replies)
Discussion started by: Migrainegirl
4 Replies
6. Shell Programming and Scripting
need to check hardware error are zero
iostat -en |awk '{ if ( $2 == 0 ) { print " " } else { print " Hardware errors "} }
can someone please tell me whats wrong with this
---------- Post updated at 10:19 PM ---------- Previous update was at 10:16 PM ----------
iostat -en
----... (11 Replies)
Discussion started by: arch12
11 Replies
7. Shell Programming and Scripting
Hello,
I would like to split a file but I dont what the subfiles to be named the way they are:
ex:
default name: xaa xab xac xad xae
desired name: b01 b02 b03 b04 b05
I know I can rename them afterwards however I have a varialbe split lenghth, in other words I am not sure how... (2 Replies)
Discussion started by: smarones
2 Replies
8. Shell Programming and Scripting
Hello,
I've searched this forum and others for a solution to my problem but nothing seems just right, I'm hoping I can get some help (seems like this should be easy, and I apologize if I've missed something on the forum):
I have several large .fastq DNA sequence files (~20million reads,... (2 Replies)
Discussion started by: ljk
2 Replies
9. Shell Programming and Scripting
The following code will split the infile into multiple files. However, I need it to insert the same first 3 lines from the original input file into each splitted file. How do I modify my script below to do so:
print -n "Enter file name to split? " ; read infile
if
then
echo "Invalid file... (4 Replies)
Discussion started by: mrn6430
4 Replies
10. Shell Programming and Scripting
I have two files containing hundreds of different sequences with the same Identifiers (ID-001, ID-002, etc.,), something like this:
Infile1:
ID-001 ATGGGAGCGGGGGCGTCTGCCTTGAGGGGAGAGAAGCTAGATACA
ID-002 ATGGGAGCGGGGGCGTCTGTTTTGAGGGGAGAGAAGCTAGATACA
ID-003... (18 Replies)
Discussion started by: Xterra
18 Replies
LEARN ABOUT OPENSOLARIS
fmt
fmt(1) User Commands fmt(1)
NAME
fmt - simple text formatters
SYNOPSIS
fmt [-cs] [-w width | -width] [inputfile]...
DESCRIPTION
fmt is a simple text formatter that fills and joins lines to produce output lines of (up to) the number of characters specified in the -w
width option. The default width is 72. fmt concatenates the inputfiles listed as arguments. If none are given, fmt formats text from the
standard input.
Blank lines are preserved in the output, as is the spacing between words. fmt does not fill nor split lines beginning with a `.' (dot), for
compatibility with nroff(1). Nor does it fill or split a set of contiguous non-blank lines which is determined to be a mail header, the
first line of which must begin with "From".
Indentation is preserved in the output, and input lines with differing indentation are not joined (unless -c is used).
fmt can also be used as an in-line text filter for vi(1). The vi command:
!}fmt
reformats the text between the cursor location and the end of the paragraph.
OPTIONS
-c Crown margin mode. Preserve the indentation of the first two lines within a paragraph, and align the left margin of
each subsequent line with that of the second line. This is useful for tagged paragraphs.
-s Split lines only. Do not join short lines to form longer ones. This prevents sample lines of code, and other such for-
matted text, from being unduly combined.
-w width | -width Fill output lines to up to width columns.
OPERANDS
inputfile Input file.
ENVIRONMENT VARIABLES
See environ(5) for a description of the LC_CTYPE environment variable that affects the execution of fmt.
ATTRIBUTES
See attributes(5) for descriptions of the following attributes:
+-----------------------------+-----------------------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+-----------------------------+-----------------------------+
|Availability |SUNWcsu |
+-----------------------------+-----------------------------+
SEE ALSO
nroff(1), vi(1), attributes(5), environ(5)
NOTES
The -width option is acceptable for BSD compatibility, but it may go away in future releases.
SunOS 5.11 9 May 1997 fmt(1)