07-26-2013
I would recommend using grep instead of awk.
grep should perform way better than awk in pattern matching.
This User Gave Thanks to Yoda For This Post:
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi there Gurus,
I have the following ftp script:
$ more ftp_dump_arch4.sh
#! /usr/bin/ksh
# Constant variables
HOST='xx.xx.xx.xx'
USER='user'
PASSWD='password'
dir='/export/file'
ftp_log='/tmp'
ftp -n $HOST > $ftp_log/ftp.log << END
user $USER $PASSWD
verbose
lcd $dir
bin (3 Replies)
Discussion started by: lweegp
3 Replies
2. Shell Programming and Scripting
Hi,
filenames:
contains name of list of files to search in.
placelist
contains the names of places to be searched in all files in "filenames"
for i in $(<filenames)
do
egrep -f placelist $i
if ]
then
echo $i
fi
done >> outputfile
Output i am getting: (0 Replies)
Discussion started by: pinnacle
0 Replies
3. 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
4. Shell Programming and Scripting
Hi everyone!!
I have a database table, which has file_name as one of its fields.
Example:
File_ID File_Name Directory Size
0001 UNO_1232 /apps/opt 234
0002 UNO_1234 /apps/opt 788
0003 UNO_1235 /apps/opt 897
0004 UNO_1236 /apps/opt 568
I have to... (3 Replies)
Discussion started by: ss3944
3 Replies
5. 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
6. 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
7. Shell Programming and Scripting
Hi,
I have a bunch of records within a directory where each one has this form:
(example file1)
1 2 50 90 80 90 43512 98 0909 79869 -9 7878 33222 8787 9090 89898 7878 8989 7878 6767 89 89 78676 9898 000 7878 5656 5454 5454
and i want for all of these files to be... (3 Replies)
Discussion started by: amarn
3 Replies
8. 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
9. UNIX for Dummies Questions & Answers
Hi,
Is it possible to have multiple files with the same name in a same unix directory?
Eg., in the path \tmp, can we have 2 files with the same name as SALES_data_20120124.TXT?
I heard it is possible if the user id that is created the files are different and with some ids, a new gets... (1 Reply)
Discussion started by: Vijay81
1 Replies
10. 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