07-05-2006
thank you for your remind. I realize it is shell programming.
now i use the following command:
for filename in *
do
../out_function $filename > ../dst/$filename
done
Thanks a lot.
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
i would like to pass a variable to awk wherein the variable comes from external loop.
i tried this...
let x=0
until test $x -eq 32
do
cat file | awk '{ print $1 , "Number" , $($x) }' >> output
done
thanks, (4 Replies)
Discussion started by: inquirer
4 Replies
2. Shell Programming and Scripting
I am trying to pass 2 shell variable's ("START" and "END") define earlier in the script to this awk statement, but i can't seem to pass it on. PLs help.
set START = xxxx
set END = yyyy
set selected_file = `awk '/$START/,/$END/' filename` (24 Replies)
Discussion started by: Raynon
24 Replies
3. UNIX for Dummies Questions & Answers
I have an awk statement where I Need to pass an environment variable but I cannot get it to work:
My evironment varible examples below:
$FILE1=/dev/fs/file.new
$FILE2=/dev/fs/file.old
Code below:
awk -F"|" '
BEGIN {
while( getline < "$FILE1" )
{ arr=1 }
}
arr != 1 { print }
'... (12 Replies)
Discussion started by: eja
12 Replies
4. Shell Programming and Scripting
Hi
I want to pass variables with the NR function in awk command.
test_file1 is input file having 500 records.
var1=100.
var2=200
awk -F" " 'NR >= $var1 && NR <= $var2' test_file1 > test_file2.
My end result should be that test_file2 should have records from line number between... (2 Replies)
Discussion started by: Nishithinfy
2 Replies
5. Shell Programming and Scripting
Does anyone know of a way to do something similar to this with awk and kill? I want to create the variable in awk and pass that variable to kill.
ps -ef | grep -i chromium | awk '{$2=x}' | kill -9 $x 2>/dev/null (9 Replies)
Discussion started by: cokedude
9 Replies
6. Shell Programming and Scripting
Hello,
I'm having some issues getting a home dir from a remote server passed to a variable.
Here is what I have so far:
rsh server "(ls -ld /home*/user | awk '{print \$9}')"
/home3/userThat works fine and brings back what I need.
But when I try to add it to a variable it goes all... (3 Replies)
Discussion started by: elcounto
3 Replies
7. Shell Programming and Scripting
Hi
I need your help, please
How can I pass arguments to system command in a awk script?... for example:
byte=substr(cadena,pos,2);
system("grep -n byte mapeo.txt");
Does it exist a way?
Thanks for advance. (4 Replies)
Discussion started by: solaris21
4 Replies
8. Shell Programming and Scripting
I have a shell script (.sh) and I want to pass a parameter value to the awk command but I am getting exception, please assist.
diff=$1$2.diff
id=$2 new=new_$diff
echo "My id is $1"
echo "I want to sync for user account $id"
##awk command I am using is as below
cat $diff | awk... (2 Replies)
Discussion started by: Ashunayak
2 Replies
9. UNIX for Advanced & Expert Users
I must have forgot how to do this, but, I am attempting to enter a variable into an awk / gawk search pattern.
I am getting a value from user input to place in a specific section of a 132 character string.
my default command is ....
gawk --re-interval '/^(.{3}P .{4}CYA.{8}1)/' ... (3 Replies)
Discussion started by: sdeevers
3 Replies
10. UNIX for Beginners Questions & Answers
Hello All,
Hope you're doing well !
I am trying below command to be passed in a shell script, header_date_14 is a variable and $1 is the name of a file I intend to pass as a command line argument, however command line argument is not being accepted.
header_date_14=$(m_dump... (8 Replies)
Discussion started by: ektubbe
8 Replies
LEARN ABOUT DEBIAN
asntool
ASNTOOL(1) NCBI Tools User's Manual ASNTOOL(1)
NAME
asntool - process ASN.1 module specifications
SYNOPSIS
asntool [-] [-B filename] [-D N] [-G] [-I str] [-J type] [-K str] [-L str] [-M filename,...] [-P str] [-Q] [-S filename] [-T filename] [-V]
[-X filename] [-Z] [-b N] [-d filename] [-e filename] [-f filename] [-l filename] -m filename [-o filename] [-p filename] [-t str]
[-v filename] [-w N] [-x filename]
DESCRIPTION
asntool reads, validates, and displays ASN.1 module specifications.
OPTIONS
A summary of options is included below.
- Print usage message
-B filename
Generate objects and code in files named filename.*
-D N Debugging level for code generation:
0 No debugging (default)
1 Shallow debugging
2 Deep debugging
3-9 Same as 2
-G Generate object loader .c and .h files
-I str Put "#include str" in generated .c file
-J type
Register type type with object manager
-K str In generated .c, force name of #included asn header to str
-L str Label registered type as str
-M filename,...
Search the ASN.1 modules in filename,... for external references
-P str XML module prefix for DOCTYPE
-Q Use quoted syntax form for generated include files
-S filename
Send debugging output to filename rather than stderr
-T filename
Dump ASN.1 tree to filename
-V Force CHOICE objects to use custom structures rather than ValNodePtrs, for compatibility with some old hand-coded object loaders.
-X filename
Write XML DTD to filename. If filename is "m", print each module to a separate file.
-Z Bit twiddle for optional zero value base slots
-b N Use N-byte buffers (default = 1024; anything between 512 and 10000 is legal)
-d filename
Read binary values from filename (requires -t)
-e filename
Write binary values to filename
-f filename
Write ASN.1 module to filename
-l filename
Write ASN.1 loader to filename
-m filename
Read ASN.1 module from filename
-o filename
Write header to filename
-p filename
Write print values to filename
-t str Expect binary values to have type str
-v filename
Read print values from filename
-w N Limit values in #defines to N bits (default = 31; anything between 31 and 128 is legal)
-x filename
Write XML data to filename
AUTHOR
The National Center for Biotechnology Information.
NCBI
2010-09-01 ASNTOOL(1)