03-31-2008
this is most definitely not the homework question, only 1 line of code in a larger script that basically uses circular shifting to move the first word to the end of the string repeatedly and later on post the results.
noise.dat is a file created that contains
the
a
an
and
or
sample.out contains (created by the script i wrote)
Analysis Software Requirements
and Filters Pipes
Filters Pipes and
Java Swing
Pipes and Filters
Requirements Analysis Software
Software Requirements Analysis
Swing Java
I didn't realize that ^ cannot be used with an input file, and is only associated with strings, Ill keep going at it. I guess Ill add some kind of if statement in my script to just get rid of any strings that begin with any of the "noise.dat" contents, since grep is being elusive.
10 More Discussions You Might Find Interesting
1. Programming
I use a standard C source to access large files in a 32 bit environment.
I've replaced fopen, fwrite and fread by fopen64, fwrite64 and fread64.
First I did a test only replacing fopen by fopen64, it compiled without any other changes to my compilation options.
The program crashed on a write, as... (3 Replies)
Discussion started by: Isax50
3 Replies
2. UNIX for Dummies Questions & Answers
Hello:
I'm a very newbee at UNIX/AIX.
What i want to do is to tail a file from the bottom until a certain string is found and write all the lines after the found string to another file.
I've tried out a lot of combination with tail and grep but doesn't find the good one.
Could someone help... (4 Replies)
Discussion started by: Felix2511
4 Replies
3. HP-UX
Hi
I am trying to make an executable which has informix esqlc and .per files. I am using informix version 9.3. The make is successful, but when i execute, i get an error message
/usr/lib/dld.sl: Unresolved symbol: ibm_lib4gl_loadint4 (code) from RVprnrecvr Abort(coredump)
I searched for... (4 Replies)
Discussion started by: venkatakrishnan
4 Replies
4. Shell Programming and Scripting
Hi Gurus,
I had a problem writing a pipe file.
Previously i used this code to generate a tab seperated file
ABCEF := ABCEF || 'to_char('|| abc_tab(col_num).col_name || ') chr(9) || ';
Now i want the o/p as pipe seperated file.I changed the line as below
ABCEF := ABCEF ||... (0 Replies)
Discussion started by: pssandeep
0 Replies
5. Solaris
deleteing post (0 Replies)
Discussion started by: dshakey
0 Replies
6. UNIX for Dummies Questions & Answers
Hi all,
I need some urgent help with grep.
I'm simply trying to extract the current date from the syslog file, which is "Oct 6" and then grepping this and output the messages to a new log file.
See the below commands and output, even though the log file is created, it is created with all the... (8 Replies)
Discussion started by: wthomas
8 Replies
7. UNIX for Dummies Questions & Answers
According to linux hardening guide a PATH variable must not contain . or ..
so i grep the path variable using.
# echo $PATH | grep "."
/usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin
# echo $PATH | grep ".."... (2 Replies)
Discussion started by: pinga123
2 Replies
8. UNIX for Dummies Questions & Answers
Hi,
I would like to extract a pattern from a line. The first two characters will always be the same in this pattern, but the proceeding numbers will not be, and the pattern will always be 6 characters long. I would like to get the entire pattern up to a certain symbol, in this case, a period.
... (3 Replies)
Discussion started by: goodbenito
3 Replies
9. UNIX for Advanced & Expert Users
grep -E '^(++){5}5000' <file_name>
this command searches value 5000 in only 6th column from provided file where pipe ( | )is delimiter which separate columns... can some one plz explain me what '^(++){5}5000' actually does..? :confused: (1 Reply)
Discussion started by: Killer420
1 Replies
10. Shell Programming and Scripting
Hello,
I have multiple text files and I need to know which of them are having character issues.
Below command is not working. Maybe instead of that weird string, I should replace it with ascii code.
grep -A0 "�" file.txt
Thank you
Boris (10 Replies)
Discussion started by: baris35
10 Replies
ZGREP(1) General Commands Manual ZGREP(1)
NAME
zgrep - search possibly compressed files for a regular expression
SYNOPSIS
zgrep [ grep_options ] [ -e ] pattern filename...
DESCRIPTION
Zgrep invokes grep on compressed or gzipped files. These grep options will cause zgrep to terminate with an error code:
(-[drRzZ]|--di*|--exc*|--inc*|--rec*|--nu*). All other options specified are passed directly to grep. If no file is specified, then the
standard input is decompressed if necessary and fed to grep. Otherwise the given files are uncompressed if necessary and fed to grep.
If the GREP environment variable is set, zgrep uses it as the grep program to be invoked.
EXIT CODE
2 - An option that is not supported was specified.
AUTHOR
Charles Levert (charles@comm.polymtl.ca)
SEE ALSO
grep(1), gzexe(1), gzip(1), zdiff(1), zforce(1), zmore(1), znew(1)
ZGREP(1)