03-20-2019
Hi RudiC
I tried through "tee" output to the stderr, hence the my first varient with "cut", but I did not succeed.
I will write your code in my notes. Thanks
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Hi
i need to print pathname in which the string present using 'find' command
sample output like this
Pathname String to be searched
---------- --------------------
/usr/test/myfile get
/opt/test/somefile get
Thanks in... (4 Replies)
Discussion started by: princein
4 Replies
2. Shell Programming and Scripting
Hi ,
I have a directory structure as dir and subdirectories and files under it and so on.now I need to find the files which contain the search string under every dir and subdir and replace .
my search string is like
searchstring=/a/b
string to be replaced=/a/c/b
please help.
... (7 Replies)
Discussion started by: mohanpadamata
7 Replies
3. 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
4. UNIX for Dummies Questions & Answers
I have a file called po.txt. Here is the content of the file:
<!DOCTYPE PurchaseOrderMessage (View Source for full doctype...)>
- <PurchaseOrder>
- <Header>
<MessageId>cdb3062b-685b-4cd5-9633-013186750e10</MessageId>
<Timestamp>2011-08-01T13:47:23.536-04:00</Timestamp>
</Header>
-... (4 Replies)
Discussion started by: webbi
4 Replies
5. Shell Programming and Scripting
Hi all,
how to recursively search for a list of keywords in a given directory??
for example:
suppose i have kept all the keywords in a file called "procnamelist" (in separate line)
and i have to search recursively in a directory called "target/dir"
if i am not doing recursive search then... (4 Replies)
Discussion started by: neelmani
4 Replies
6. Shell Programming and Scripting
I have a file with
<suit:run date="Trump Tue 06/19/2012 11:41 AM EDT" machine="garg-ln" build="19921" level="beta" release="6.1.5" os="Linux">
Need to find word "build" then
extract build number, which is 19921 also
release number, which is 6.1.5 then
concatenate them to one variable as... (6 Replies)
Discussion started by: garg
6 Replies
7. UNIX for Advanced & Expert Users
i have a file named keyword.csv(contains around 8k records) which contains a no. of columns.
The 5th column contains all the keywords.
I want to recursively search these keywords in all .pl files(around 1k) and display the filename....Afterthat i will use the filename and some of the column from... (3 Replies)
Discussion started by: millan
3 Replies
8. Shell Programming and Scripting
Hi guys,
I have a text file named file1.txt that is formatted like this:
001 , ID , 20000
002 , Name , Brandon
003 , Phone_Number , 616-234-1999
004 , SSNumber , 234-23-234
005 , Model , Toyota
007 , Engine ,V8
008 , GPS , OFF
and I have file2.txt formatted like this:
... (2 Replies)
Discussion started by: An0mander
2 Replies
9. Shell Programming and Scripting
Hi,
How can I use find command to search string/pattern in a file recursively?
What I tried:
find . -type f -exec cat {} | grep "make" \;
Output:
grep: find: ;: No such file or directory
missing argument to `-exec'
And this:
find . -type f -exec cat {} \; -exec grep "make" {} \;... (12 Replies)
Discussion started by: cola
12 Replies
10. UNIX for Beginners Questions & Answers
Good Evening Folks -
I have a need to search a specific directory and ALL sub-directories for the following string:
Data Load UpdatedIf this string is found, I need to print content from the line directory above it between symbols, as well as the file name where it is found.
Here is a... (1 Reply)
Discussion started by: SIMMS7400
1 Replies
TEE(1) User Commands TEE(1)
NAME
tee - read from standard input and write to standard output and files
SYNOPSIS
tee [OPTION]... [FILE]...
DESCRIPTION
Copy standard input to each FILE, and also to standard output.
-a, --append
append to the given FILEs, do not overwrite
-i, --ignore-interrupts
ignore interrupt signals
--help display this help and exit
--version
output version information and exit
If a FILE is -, copy again to standard output.
AUTHOR
Written by Mike Parker, Richard M. Stallman, and David MacKenzie.
REPORTING BUGS
Report tee bugs to bug-coreutils@gnu.org
GNU coreutils home page: <http://www.gnu.org/software/coreutils/>
General help using GNU software: <http://www.gnu.org/gethelp/>
Report tee translation bugs to <http://translationproject.org/team/>
COPYRIGHT
Copyright (C) 2010 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law.
SEE ALSO
The full documentation for tee is maintained as a Texinfo manual. If the info and tee programs are properly installed at your site, the
command
info coreutils 'tee invocation'
should give you access to the complete manual.
GNU coreutils 8.5 February 2011 TEE(1)