10 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
I have this fileA
TEST FILE ABC
this file contains ABC;
TEST FILE DGHT this file contains DGHT;
TEST FILE 123
this file contains ABC,
this file contains DEF,
this file contains XYZ,
this file contains KLM
;
I want to have a fileZ that has only (begin search pattern for will be... (2 Replies)
Discussion started by: vbabz
2 Replies
2. UNIX for Beginners Questions & Answers
I have existing pattern in the perl script as:
my $pattern = "^Line.*?:|^Errors*: |^SEVERE:.*?:|^Null pointer exception occurred";
and I wanted to include below keywords in my search pattern
"I/O exception" and "FileNotFoundException"the problem is when I include my pattern like
my... (5 Replies)
Discussion started by: ambarginni
5 Replies
3. Shell Programming and Scripting
Hi
Need help for below coding scenario.
I have a file with say 4 lines as below.
DEFINE JOB TPT_LOAD_INTO_EMP_DET
( TDPID = @TPT_TDSERVER , USERNAME = @TPT_TDUSER ) ;
( 'DROP TABLE '||@TPT_WRKDB ||'.LOG_'||@TPT_TGT ||' ; ') ,
SELECT * FROM OPERATOR (FILE_READER) ; ) ;
Now I want to... (5 Replies)
Discussion started by: Santanu2015
5 Replies
4. Shell Programming and Scripting
hi,
i have one file as t1.txt as below
hi
hello
welcome
i want perl script to search for the pattern "abcd" in the file.
if the pattern doesn't exist, i want to insert that pattern at the end of the same file t1.txt
my o/p should be
hi
hllo
welcome
abcd
thank you (3 Replies)
Discussion started by: roopa
3 Replies
5. Shell Programming and Scripting
I'm doing a script where you are suppose to start off in accepting one or more directory as an argument. How do i do this?
Sorry for the nub question. (2 Replies)
Discussion started by: LinuxUser232331
2 Replies
6. Shell Programming and Scripting
How can I pass $var_find variable as argment to find command?
test.sh
var_find=' \( -name "*.xml" -o -name "*.jsp" \) '
echo "${var_find}"
find . -type f ${var_find} -print
# Below statement works fine.. I want to replace this with the above..
#find . \( -name "*.xml" -o -name... (4 Replies)
Discussion started by: kchinnam
4 Replies
7. Shell Programming and Scripting
Can someone please help me with this SHELL script?
I need to create a script that gets a positive number n as an argument. The script must calculate the factorial of its argument. In other words, it must calculate n!=1x2x3x...xn. Note that 0!=1.
Here is a start but I have no clue how to... (3 Replies)
Discussion started by: I-1
3 Replies
8. Shell Programming and Scripting
I am trying to do some thing like this ..
In a file , if pattern found insert new pattern at the begining of the line containing the pattern.
example:
in a file I have this.
gtrow0unit1/gctunit_crrownorth_stage5_outnet_feedthru_pin
if i find feedthru_pin want to insert !! at the... (7 Replies)
Discussion started by: pitagi
7 Replies
9. Shell Programming and Scripting
Hi,
I am new to UNIX. I am facing some problem here.
#! /usr/bin/ksh
currDate = $1
export currDate;
echo " Date is $currDate"
when I run this script, it says : currDate not found.
Can anybody point out the mistake please.
--mahek (3 Replies)
Discussion started by: mahek_bedi
3 Replies
10. Shell Programming and Scripting
Hi All,
I have two directories as
1) mi/job -> job1.sh, job2.sh, job3.sh
2) mi/sysin -> sysin1, sysin2, sysin3,sysin4
I want to wrrite a script such that it should accept two parameters as directory paths.
$ myscript mi/sysin mi/job.
The script should be able to scan all files... (3 Replies)
Discussion started by: rahulrathod
3 Replies