10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hello, there!
I am running an executable awk script with 'source.awk input_file' and found that when I need to print FILENAME, or ENVIRON or even FNR nothing happens ...
However, if I run it with 'awk -f source.awk input_file', then those variables are printed...
What is the reason for that... (1 Reply)
Discussion started by: fbird3
1 Replies
2. Shell Programming and Scripting
Hi,
If i were to do this an print out the file, it will show as it is in the command
$ awk '/Privilege Use/ {P=0} /Object Access/ {P=1} P' AdvancedAudit.txt
Object Access
File System No Auditing
Registry No Auditing
Kernel... (1 Reply)
Discussion started by: alvinoo
1 Replies
3. UNIX for Dummies Questions & Answers
Edit: Sorry. Mistakenly posted - please delete (3 Replies)
Discussion started by: Reddax
3 Replies
4. Shell Programming and Scripting
Hello everyone,
The following are my input files.
The following are my sequence of steps.
Can someone please let me know about how to make these bunch of steps into a single script so that I start the script with 1.txt and 2.txt, after execution gives me the final... (11 Replies)
Discussion started by: jacobs.smith
11 Replies
5. UNIX for Advanced & Expert Users
Hi,
I have a patternfile with following pattern
cat
dog
cow
pig
Let's say I have thousand files
file0001
file0002
file0003
.
.
.
file1000
Each pattern can occur multiple times in multiple files. How can I search for pattern so the output of pattern and the filename is printed... (1 Reply)
Discussion started by: yoda9691
1 Replies
6. Shell Programming and Scripting
Consider the following sample scripts.....
filename: f1
# Call f3
f3
filename: f2
# Call f3
f3
filename: f3
# f3
echo "$x called me" (2 Replies)
Discussion started by: frozensmilz
2 Replies
7. Shell Programming and Scripting
Guys I placed
#!path/awk -f
placed awk script
and used $1 to call 1st inputfile inside the script.
But some where I did mistake. Could you please help me run this script as executable
I forgot to mention I also used BEGIN before placing awk script. But nothing worked out.
Script
... (2 Replies)
Discussion started by: repinementer
2 Replies
8. UNIX for Dummies Questions & Answers
Hi,
My requirement is to search for a paritcular string from a group of .gz files and to print the lines containing that string and the name of the files in which that string is present.
Daily 500 odd .gz files will be generated in a directory(directory name will be in the form of... (4 Replies)
Discussion started by: krao
4 Replies
9. UNIX for Dummies Questions & Answers
I have created a nawk program and passing a file as an input parameter.
The filename will be /home/dir/ksh/test.out
I need to extract the filename alone. Is there anyway to get this ?
Input : /home/dir/ksh/test.out
Output -1: test.out
Output -2 : t
Input :... (1 Reply)
Discussion started by: sivakumar.rj
1 Replies
10. Shell Programming and Scripting
I am trying to write a script that prompts users for date and time, then process the gzip file into awk. During the ksh part of the script another file is created and needs to be processed with a different set of pattern matches then I need to combine the two in the end. I'm stuck at the part... (6 Replies)
Discussion started by: timj123
6 Replies