Hi,
I have a script that at one point prints to a file as follows:
printf -- $2 > ~/.mydir/$1
The idea is to print to a hidden directory .mydir in my home directory. I've already sanitized the inputs and $1 is in the format path1/path2/filename and $2 is some user input.
When I run this... (2 Replies)
Dear Friends, we have one ST 6140 storage in our data center.The structure is like that, virtual disk vdisk(RAID-5) was created using 7 hard disks and the vdisk is divided in to 4 volumes each have 1TB of size.These 4 volumes are mapped to solaris 9 server and created RAID 0 using SVM and is... (1 Reply)
Say you have this numeric variable that can be set by the user but you never want it to leave a certain range when it gets printed. How could you use parameter expansion such that it will never expand outside of that boundary? Thanks
---------- Post updated at 11:09 PM ---------- Previous update... (3 Replies)
I have a bunch of files which I need to transfer to another location... and some of these I need to skip.
For e.g. let us say the files are:
cust_abc.dat
cust_xyz.dat
cust_def.dat
and I only want to move the first two.
I want to do something like:
cp cust_.dat <target>
... (1 Reply)
Hi,
I'm trying to figure out whether some files exist. Locations of those file are stored in a plain text file called temp.txt in this way:
All environment variables ($LIB_HOME and $ORACLE_HOME) have been set using export command.
Then I do:
while read line; do ] && echo "OK ==> $line" ||... (6 Replies)
Hello.
I cannot write a command without using eval.
Any help is welcome
Note 1 : What does the function SOMETHING has no importance.
Note 2 : What does the command find has no importance.
It is an expansion variable problem : where to put or or or anythings else
What works (FILTRE_1... (8 Replies)
(Using Bash 4.4)
When I write something like dir="~/dox"
ls $dir then I get the message that the directory '~/docs' does not exist. I understand that the tilde is not expanded at the time of the above assignment because of the quotes. But why is it not expanded at the time when the ls command is... (2 Replies)
Hello All,
Could you please do help me here as I would like to perform parameter expansion in shell over a parameter expansion.
Let's say I have following variable.
path="/var/talend/nat/cdc"
Now to get only nat I could do following.
path1="${path%/*}"
path1="${path1##*/}"
Here... (8 Replies)
Discussion started by: RavinderSingh13
8 Replies
LEARN ABOUT OSX
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 ALSOmktexlsr(1), mktexmf(1), mktexpk(1), mktextfm(1).
Kpathsea 6.1.0 1 March 2011 KPSEWHICH(1)