07-07-2012
@raj, that will work if there are not too many files AND if those files do not contain special characters and/or spaces....
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
hi all
i am etl guy
i have shell script that i use to do processing on file.
the problem is that i want it to use on multiple files at same time
is there any way of passing the file name since my all my filename start with samename like abc*
p,ease let me know (4 Replies)
Discussion started by: er_zeeshan05
4 Replies
2. Shell Programming and Scripting
Hello,
I am trying to write a bash shell script that does the following:
1.Finds all *.txt files within my directory of interest
2. reads each of the files (25 files) one by one (tab-delimited format and have the same data format)
3. skips the first 10 rows of the file
4. extracts and... (4 Replies)
Discussion started by: manishabh
4 Replies
3. Shell Programming and Scripting
I want to pass the first file as input argument using -v then first get awk to go through mref then pert.txt
awk -v mref="reference.txt" -f ../../A-Scripts/convert-zv-zp.awk pert.txt
BEGIN {
Version = "V04"
if ( !mref ) {
usage(Version)
print "ERROR: mref not... (1 Reply)
Discussion started by: kristinu
1 Replies
4. UNIX for Dummies Questions & Answers
Hi guys,
say I have a few files in a directory (58 text files or somthing)
each one contains mulitple strings that I wish to replace with other strings
so in these 58 files I'm looking for say the following strings:
JAM (replace with BUTTER)
BREAD (replace with CRACKER)
SCOOP (replace... (19 Replies)
Discussion started by: rich@ardz
19 Replies
5. UNIX for Dummies Questions & Answers
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
6. Shell Programming and Scripting
Hi,
I have a directory /home/datasets/ which contains a bunch (720) of subdirectories called hour_1/ hour_2/ etc..etc.. in each of these there is a single text file called (hour_1.txt in hour_1/ , hour_2.txt for hour_2/ etc..etc..) and i would like to do some text processing in them.
Each of... (20 Replies)
Discussion started by: amarn
20 Replies
7. Shell Programming and Scripting
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
8. Shell Programming and Scripting
Using ksh to call a function which has awk script embedded.
It parses a long two element list file, filled with text numbers (I want column 2, beginning no sooner than line 45, that's the only known thing) . It's unknown where to start or end the data collection, dynamic variables will be used. ... (1 Reply)
Discussion started by: highnthemnts
1 Replies
9. Shell Programming and Scripting
Hi ,
can I pass more then one variable to awk using -v option? (4 Replies)
Discussion started by: Anupam_Halder
4 Replies
10. Shell Programming and Scripting
Hi,
I'm using awk command in bash script. I'm able to pass multiple files to awk for processing.The code i can use is as below(sample code)
#!/bin/bash
awk -F "," 'BEGIN {
...
...
...
}' file1 file2 file3
In the above code i'm passing the file names manually and it is fine till my... (7 Replies)
Discussion started by: shree11
7 Replies
ncheck(1M) System Administration Commands ncheck(1M)
NAME
ncheck - generate a list of path names versus i-numbers
SYNOPSIS
ncheck [-F FSType] [-V] [generic_options] [-o FSType-specific_options] [special...]
DESCRIPTION
ncheck with no options generates a path-name versus i-number list of all files on special. If special is not specified on the command
line the list is generated for all specials in /etc/vfstab which have a numeric fsckpass. special is the raw device on which the file
system exists.
OPTIONS
-F Specify the FSType on which to operate. The FSType should either be specified here or be determinable from
/etc/vfstab by finding an entry in the table that has a numeric fsckpass field and an fsckdev that matches spe-
cial.
-V Echo the complete command line, but do not execute the command. The command line is generated by using the options
and arguments provided by the user and adding to them information derived from /etc/vfstab. This option may be
used to verify and validate the command line.
generic_options Options that are commonly supported by most FSType-specific command modules. The following options are available:
-i i-list Limit the report to the files on the i-list that follows. The i-list must be separated by commas
with no intervening spaces.
-a Print the names "." and ".." which are ordinarily suppressed.
-s Report only special files and files with set-user-ID mode. This option may be used to detect viola-
tions of security policy.
-o Specify FSType-specific_options in a comma separated (without spaces) list of suboptions and keyword-attribute
pairs for interpretation by the FSType-specific module of the command.
USAGE
See largefile(5) for the description of the behavior of ncheck when encountering files greater than or equal to 2 Gbyte ( 2**31 bytes).
FILES
/etc/vfstab list of default parameters for each file system
ATTRIBUTES
See attributes(5) for descriptions of the following attributes:
+-----------------------------+-----------------------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+-----------------------------+-----------------------------+
|Availability |SUNWcsu |
+-----------------------------+-----------------------------+
SEE ALSO
vfstab(4), attributes(5), largefile(5) Manual pages for the FSType-specific modules of ncheck
NOTES
This command may not be supported for all FSTypes.
SunOS 5.10 30 May 2001 ncheck(1M)