10-01-2010
Post a snippet of an example input file with desired output. When doing so, use code tags please.
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi all,
I am search a string from a file using following command, I want to pick the message ( I.e print $5) from the lookup file if and only if both $hostname and $instancename match.
Message=`cat $lookup_tbl| awk '/'$category'/ {if ('$hostname' == '$2' || '$instancename' == '$3') print $5}'`... (2 Replies)
Discussion started by: sudhish
2 Replies
2. Shell Programming and Scripting
Hi All,
I want to search all the ksh scripts that has following details.
1. Search for "exit 0"
2. Search for "sqlldr" or sqlplus"
3. In the above files i want to search for all the script that has no "case" in it.
Please advice.
Thanks,
Deep (2 Replies)
Discussion started by: deepakpv
2 Replies
3. UNIX for Dummies Questions & Answers
Hi,
I need to find if there is any error in the last few lines of the log file and send a mail accordingly.For example,
Following errors can be logged in the log file.
ERR_1="DB Connection not established"
ERR_2="Server Unloading"
I need to find if these errors are found in the log file and... (3 Replies)
Discussion started by: AnneAnne
3 Replies
4. Shell Programming and Scripting
Hi,
I need to search for some strings in specific positions in a file.
If the strings: "foo1", "foo2" or "foo3" is on position 266 or position 288 in a file i want the whole line printed.
Any idea how to do it? (5 Replies)
Discussion started by: HugoH
5 Replies
5. Shell Programming and Scripting
I tried awk for this, but failed <or my code is not correct? I dont know>. Can anyone help me on this?
---------- Post updated at 08:34 PM ---------- Previous update was at 08:29 PM ----------
my working file looks like this:
<empty>
<empty>
<empty>
NAME :ABC AGE :15
GENDER... (6 Replies)
Discussion started by: kingpeejay
6 Replies
6. Shell Programming and Scripting
I have a list of files all over a file system e.g.
/home/1/foo/bar.x
/www/sites/moose/foo.txtI'm looking for strings in these files and want to replace each occurrence with a replacement string, e.g.
if I find: '#@!^\&@ in any of the files I want to replace it with: 655#@11, etc.
There... (2 Replies)
Discussion started by: spacegoose
2 Replies
7. Shell Programming and Scripting
Hi,
Whether we can search multiple strings using or in grep -F
In Generally,
grep -F "string1" "filename.txt"
How to search for multiple string using grep -F as we using grep
grep "string1\|string2" "filename.txt"
Regards,
Nanthagopal A (10 Replies)
Discussion started by: nanthagopal
10 Replies
8. Shell Programming and Scripting
Hi,
I need someone's help in writing correct perl code.
I implemented following code for "multiple search strings replaced with single string".
=========================================================
#!/usr/bin/perl
my $searchStr = 'register_inst\.write_t\(' |... (2 Replies)
Discussion started by: chettyravi
2 Replies
9. Shell Programming and Scripting
i search between two strings viz <app-deployment> & </app-deployment> and save the contents in a new file using the code snippet below.
sed -n "/<app-deployment/,/<\/app-deployment>/p" deploy.tmp >found1.tmpBut if the search string apprears more than once in the file then how can i store the... (3 Replies)
Discussion started by: mohtashims
3 Replies
10. UNIX for Beginners Questions & Answers
Hello Everyone ,
Iam a newbie to shell programming and iam reaching out if anyone can help in this :-
I have two files
1) Insert.txt
2) partition_list.txt
insert.txt looks like this :-
insert into emp1 partition (partition_name)
(a1,
b2,
c4,
s6,
d8)
select
a1,
b2,
c4, (2 Replies)
Discussion started by: nubie2linux
2 Replies
LEARN ABOUT CENTOS
__gnu_parallel::parallel_tag
__gnu_parallel::parallel_tag(3) Library Functions Manual __gnu_parallel::parallel_tag(3)
NAME
__gnu_parallel::parallel_tag -
SYNOPSIS
Inherited by __gnu_parallel::balanced_quicksort_tag, __gnu_parallel::balanced_tag, __gnu_parallel::default_parallel_tag,
__gnu_parallel::exact_tag, __gnu_parallel::multiway_mergesort_exact_tag, __gnu_parallel::multiway_mergesort_sampling_tag,
__gnu_parallel::multiway_mergesort_tag, __gnu_parallel::omp_loop_static_tag, __gnu_parallel::omp_loop_tag, __gnu_parallel::quicksort_tag,
__gnu_parallel::sampling_tag, and __gnu_parallel::unbalanced_tag.
Public Member Functions
parallel_tag ()
parallel_tag (_ThreadIndex __num_threads)
_ThreadIndex __get_num_threads ()
void set_num_threads (_ThreadIndex __num_threads)
Detailed Description
Recommends parallel execution at compile time, optionally using a user-specified number of threads.
Definition at line 46 of file tags.h.
Constructor & Destructor Documentation
__gnu_parallel::parallel_tag::parallel_tag () [inline]
Default constructor. Use default number of threads.
Definition at line 53 of file tags.h.
__gnu_parallel::parallel_tag::parallel_tag (_ThreadIndex__num_threads) [inline]
Default constructor. Recommend number of threads to use.
Parameters:
__num_threads Desired number of threads.
Definition at line 58 of file tags.h.
Member Function Documentation
_ThreadIndex __gnu_parallel::parallel_tag::__get_num_threads () [inline]
Find out desired number of threads.
Returns:
Desired number of threads.
Definition at line 63 of file tags.h.
Referenced by __gnu_parallel::__parallel_sort().
void __gnu_parallel::parallel_tag::set_num_threads (_ThreadIndex__num_threads) [inline]
Set the desired number of threads.
Parameters:
__num_threads Desired number of threads.
Definition at line 73 of file tags.h.
Author
Generated automatically by Doxygen for libstdc++ from the source code.
libstdc++ Tue Jun 10 2014 __gnu_parallel::parallel_tag(3)