Try echo $SHELL to find your shell. Or just ps. "which shell" looks for a command named shell, which isn't much help.
How about this, with -name to avoid the grep. This checks in the filename. -path would check in the file path instead.
The IFS avoids having read split on anything, and the -r prevents it from trying to evaluate backslashes. It's a good habit when you want read to give you literal, unchanged input...
One caveat: Variables you set inside the "while" won't be set outside the loop. The | puts the loop into a separate, independent subshell.
I need to do the following:
1) find files in certain directories that have todays date stamp
2) use these files as input arguements into another command (1 Reply)
Hello
I was wandering if I can combine find command in side for each loop in unix
the main propose is to change some thing in files from several types and not all of them
is this possible ? (on liner script? )
tnx for the helppers (3 Replies)
I have the following statement in script:
find ${LANDING_FILE_DIR}${BTIME_FILENAME_PATTERN2} -print | while read file; do
...
done
When there are no files located by the find comand it returns:
"find: bad status-- /home/rnitcher/test/....." to the command line
How do I get control in... (3 Replies)
Hi,
I am triying to make sure that there exists only one file with the pattern abc* in path /path/. This directory is having many huge files. If there is only one file then I have to take its complete name only to use furter in my script.
I am planning to do like this:
if ; then... (2 Replies)
HI ,
I am trying to wite a script that will prompt me saying " what is path that you want to find ?". once i specify the path, the script should put this path in the find command mentioned below and execute the script:
find <path> -ctime +200 -type f -exec ls -l {} \;
for example :
... (7 Replies)
Hello friends,
I want a command to print the reult files from find command into a text file.:)
Iam looking from forum memebers. PLZ help me.ASAP
Thanks in Advance,
Siva Ranganath CH (5 Replies)
i have executed the following command in terminal
find /Users/vasu -name "*.txt" -print
and i am getting the result
/Users/vasu/file1.txt
/Users/vasu/file2.txt
/Users/vasu/file3.txtbut while i was trying to execute the same in the script it is not working,I tried with below logic in... (2 Replies)
Hi guys!
Kind of new to bash scripting and now I'm stuck.
I need to curl with these variables:
"{ \"nodename\": \"$1\", \"ipaddress\": \"$2\", \"poolname\": \"$3\", \"port\": \"$4\", \"loadbalancer\" : \"$5\" }"
and my input_file.txt contains
server001 10.10.10.01 serverpool1 80... (4 Replies)
Discussion started by: yort
4 Replies
LEARN ABOUT OPENSOLARIS
vstp
VSTP(1) BrlNet User's Manual VSTP(1)NAME
vstpg, vstpp - VisioBraille file transferring
SYNOPSIS
vstpg [-ifbnd] [-s socketport] [-k keyname] [-o configname] file ...
DESCRIPTION
vstpg (resp. vstpp) gets (resp. puts) files from (resp. onto) a VisioBraille terminal.
For communicating with the terminal, you must launch brltty with the BrlNet driver, and telling BrlNet to use the VisioBraille driver.
Before putting on the terminal, file names are truncated to 8 characters without any extension.
Before getting from terminal, leading path and trailing extensions are removed, but put back for local filename.
COMMAND-LINE OPTIONS-i ask for confirmation of transfer, for each file (on the terminal)
-f don't ask for such a confirmation (default)
-b if they exists, recursively rename the old files with an added .x suffix, just like logrotate does
-n do not keep such backup file (default)
-s socketport
use socketport as the port number instead of default for connecting to BrlNet
-k filename
use filename as key path instead of default for reading BrlNet's authentication key
-d use current directory rather than the download directory (see vbs_dir below)
-o filename
also read filename as config file
CONFIG FILE
vstpg and vstpp read a configuration file $HOME/.vstprc which contains keywords or equalities, one per line (what follows a # is ignored).
You can ask them to also read any other file thanks to the -o option.
Here are keywords:
backup make -b option the default
nobackup
make -f option the default
and equalities:
keyname = filename
use this file instead of default, to find BrlNet's authentication key
socketport = port
use this port number, instead of default, to connect to BrlNet
vbs_ext = .ext
use .ext as an extension for downloaded files (.vis by default) this is overriden on command line if an extension is provided in the
file name
vbs_dir = path
use path instead of current directory for putting files, except when using the -d option, or if the filename begins with '.'
RETURNED VALUE
1 syntax error on command line
2 connection with BrlNet error
3 Unix file error
4 Protocol error
16 interrupted by user
SHELL EXPANSIONS
Beware of special chars: * and . are often expanded by your shell, hence vstpp * will probably do what you want, putting every file exist-
ing in the current directory onto the terminal, but vstpg * may not do what you want: it will only get every file which already exist in
the current directory, skipping those you just created on your terminal ! If you want to get every file which exist in the terminal, you
should use vstpg '*' or something similar (please read your shell manual).
The same warning applies to other special chars, such as $, ~, &,... which should be protected by surrounding arguments by quotes (') or by
using single backslashes () just before them (please read your shell manual).
BUGS
The one we could find has been corrected :)
AUTHOR
Samuel Thibault <samuel.thibault@ens-lyon.org> and Sebastien Hinderer <sebastien.hinderer@ens-lyon.fr>
BrlNet Jul 15, 2002 VSTP(1)