03-20-2019
As with all shell scripting questions: which shell (and version) do you use? Which OS (and version) do you use? And, most important of all: what have you tried already?
I hope this helps.
bakunin
This User Gave Thanks to bakunin For This Post:
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
LEARN ABOUT SUSE
kpsewhich
KPSEWHICH(1) General Commands Manual KPSEWHICH(1)
NAME
kpsewhich - standalone path lookup and and expansion for kpathsea
SYNOPSIS
kpsewhich [options] [filenames]
DESCRIPTION
This manual page is not meant to be exhaustive. The complete documentation for this version of TeX can be found in the info file or manual
Kpathsea: A library for path searching.
kpsewhich is used as a standalone front-end of the kpathsea library that can be used to examine variables and find files. When the -format
option is not given, the search path used when looking for a file is inferred from the name given, by looking for a known extension. If no
known extension is found, the search path for TeX source files is used.
OPTIONS
kpsewhich accepts the following options:
-debug num
Set debugging flags.
-D num Use a base resolution of num; the default, set by the installer, is typically 600.
-dpi num
As -D.
-engine string
Set $engine in the environment, which is used in some search paths.
-expand-braces string
Print variable and brace expansion of string.
-expand-path string
Print complete path expansion of string.
-expand-var string
Print variable expansion of string.
-format name
Use file type name. See the info manual for a list of valid names, or use the -help option to print the list.
-help Print help message and exit.
-interactive
Ask for additional filenames to look up.
-mktex fmt
enable mktexfmt generation. (fmt=pk/mf/tex/tfm)
-mode string
Set device name for $MAKETEX_MODE to string; no default.
-must-exist
Search the disk as well as ls-R if necessary.
-no-mktex fmt
disable mktexfmt generation. (fmt=pk/mf/tex/tfm)
-path string
Search in the path string.
-progname string
Set program name to string.
-show-path name
Output search path for file type name. See the info manual for a list of valid names, or use the -help option to print the list.
-var-value variable
Print the expansion of variable.
-version
Print version information and exit.
SEE ALSO
mktexlsr(1), mktexmf(1), mktexpk(1), mktextfm(1).
Kpathsea 6.1.0 1 March 2011 KPSEWHICH(1)