03-08-2007
Can you post those sample lines and output you need ?
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
hi there
can anyone tell me how to search and copy files under unix?
im writing shell scripts with 'vi' and 'pico'
something like
read directoryName
if
then
echo Copying the files
copy those *.src files to sub1(another directory) using cp
else
... (4 Replies)
Discussion started by: nickaren
4 Replies
2. Shell Programming and Scripting
Hi,
I am trying to search a character in a file and remove it from that file....
My file looks something like this:
test1.txt
ckj12300_00|123|var1|10.2
ckj00200_12|444|var2|11.2
ckj00200_14|4556|var3|33.5
c00200_00_000|4558|var4|33.5
ckj00200_14|4553|var5|33.5... (7 Replies)
Discussion started by: rkumar28
7 Replies
3. Shell Programming and Scripting
Hi
I was wondering why command 2 doesn't work like command 1 below.
1.
find . -exec grep "test" '{}' \; -print
2.
ls -R | grep "test"
I am trying to search "test" from all the files in the current and sub directories. What's wrong with my command 2?
Thanks in advance for your help (4 Replies)
Discussion started by: tiger99
4 Replies
4. Shell Programming and Scripting
I have a list of files in directory and i should write a script if any of these files contains words given in a text file test.txt. the words can be case ignored and word should match.
The output should be the name of the directory in which the file is present followed by list of file names
Eg:... (1 Reply)
Discussion started by: kinny
1 Replies
5. Shell Programming and Scripting
I have a list of pattern in a file, I want each of these pattern been searched from 4 files. I was wondering this can be done in SED / AWK.
say my 4 files to be searched are
> cat f1
abc/x(12) 1
abc/x 3
cde 2
zzz 3
fdf 4
> cat f2
fdf 4
cde 3
abc 2... (6 Replies)
Discussion started by: novice_man
6 Replies
6. Shell Programming and Scripting
Hi I have multiple files in a folder and one file which contains a list of files (one on each line). I was to search for a string only within these files and not the whole folder. I need the output to be in the form
File1<tab>string instance 2<tab> string instance 2<tab>string instance 3... (6 Replies)
Discussion started by: pkabali
6 Replies
7. Red Hat
Hello,
Please help me with this!! Thanks in advance!!
I have a file named file.gc with the content:
1-- Mon Sep 10 08:53:09 CDT 2012
2revoke connect from FR2261;
3delete from mkt_allow where grantee = 'FR2261';
4grant connect to FR2261 with '******';
5alter user FR2261 comment... (0 Replies)
Discussion started by: raosr020
0 Replies
8. Shell Programming and Scripting
I have two files:
file 1:
hello.com neo.com,japan.com,example.com
news.net xyz.com, telecom.net, highlands.net, software.com
example2.com earth.net, abc.gov.uk
file 2:
neo.com
example.com
abc.gov.uk
file 2 are the search keys to search in file 1 if any of the search key is... (3 Replies)
Discussion started by: csim_mohan
3 Replies
9. Shell Programming and Scripting
so i'm running a variation of the following command a few times in my script:
echo "${TOTALRunning}" | awk -F"" '/'"${PROCSEARCH}"'/ {print $2}' | tr '\n' '|'
unfortunately i cant paste the content of the variable TOTALRunning into this thread for security reasons.
what i want to do is... (9 Replies)
Discussion started by: SkySmart
9 Replies
10. UNIX for Beginners Questions & Answers
I have two file as given below which shows the ACL permissions of each file. I need to compare the source file with target file and list down the difference as specified below in required output. Can someone help me on this ?
Source File
*************
# file: /local/test_1
# owner: own
#... (4 Replies)
Discussion started by: sarathy_a35
4 Replies