Sponsored Content
Top Forums Shell Programming and Scripting Need quick help with basic FIND in korn shell Post 11202 by MizzGail on Friday 30th of November 2001 10:51:40 AM
Old 11-30-2001
Lightbulb

I work in digital unix. If you are searching for a wild card it must be in quotes. Your command line mightneed to be:

find $HOME -name "ass*" -print

Also try
cd $HOME
ls -l | grep $2
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Find -name "*.txt" in Korn Shell Script

The following find command works on the Korn Shell command line: find . \( ! -name . -prune \) -type f -name "*.txt" -mtime +100 In the particular directory I'm in, the above find will list correctly the three text files that exist that haven't been modified in over 100 days: ... (3 Replies)
Discussion started by: jwperry
3 Replies

2. Shell Programming and Scripting

KORN Shell - Spawn new shell with commands

I want to be able to run a script on one server, that will spawn another shell which runs some commands on another server.. I have seen some code that may help - but I cant get it working as below: spawn /usr/bin/ksh send "telnet x <port_no>\r" expect "Enter command: " send "LOGIN:x:x;... (2 Replies)
Discussion started by: frustrated1
2 Replies

3. Shell Programming and Scripting

how to convert from korn shell to normal shell with this code?

well i have this code here..and it works fine in kornshell.. #!/bin/ksh home=c:/..../ input=$1 sed '1,3d' $input > $1.out line="" cat $1.out | while read a do line="$line $a" done echo $line > $1 rm $1.out however...now i want it just in normal sh mode..how to convert this?... (21 Replies)
Discussion started by: forevercalz
21 Replies

4. UNIX for Dummies Questions & Answers

find and FTP multiple files in Korn Shell

I want to FTP multiple files in a directory that the files were created since midnight of the same day using korn shell. I can use the "find" command using -newer arguement that compares against a time stamp file. The script identifies the files, I can't use a variable = `find . ` as the... (2 Replies)
Discussion started by: lambjam
2 Replies

5. Shell Programming and Scripting

need a quick basic shell script help

im trying to run the below if command ifconfig -a |grep 10.100.120.21 gives me below output inet addr:10.100.120.21 Bcast:10.100.120.255 Mask:255.255.255.0 i just want a basic shell which says if above exists then continue how would i do this? (6 Replies)
Discussion started by: eb222
6 Replies

6. Shell Programming and Scripting

quick script C shell

Cool. I played with scripts at home over the weekend. Come to find out not working on other shells. I have linux/bash at home, but now I'm trying on Solaris csh. How would I write the following script for Solaris C shell? ---------- #!/bin/bash NBR=231 for ((i = 0; i < $NBR; i++ )) do... (1 Reply)
Discussion started by: ajp7701
1 Replies

7. Shell Programming and Scripting

Korn Shell Script to find out error in logfile

Hi All, I am new to this forum as well as to unix scripting. Can you please help me to create a korn shell script to find out errors in logfiles and get the name of that logfile ( which is having error) in email and email it to me? (2 Replies)
Discussion started by: jithu
2 Replies

8. Shell Programming and Scripting

Find command in Korn Shell

Hi, I am trying to execute the below in Ksh (telnet) find ./request.txt -mmin -30 It says find: bad option -mmin What i am trying to do is by using find command i am checking wheather the file request.txt is there for 30 minutes or not Please help (1 Reply)
Discussion started by: chinniforu2003
1 Replies

9. Shell Programming and Scripting

How to activate Korn Shell functionnalities in Bourne Shell

Hi All I have writing a Korn Shell script to execute it on many of our servers. But some servers don't have Korn Shell installed, they use Borne Shell. Some operations like calculation don't work : cat ${file1} | tail -$((${num1}-${num2})) > ${file2} Is it possible to activate Korn Shell... (3 Replies)
Discussion started by: madmat
3 Replies

10. Shell Programming and Scripting

Quick Help in shell script

Need to subtract date stored in variable from the current date, answer should come in days..and months. Suppose two variable having value like A=”Wed Jan 15 08:59:08 GMT 2014” B= `date` #Sun May 23 09:29:40 GMT 2010 SubtractAB= $A-$B #..? AddAB=$A+$B #... ? C=$B+9 # Sun May 23... (3 Replies)
Discussion started by: KuldeepSinghTCS
3 Replies
packingrules(4) 						   File Formats 						   packingrules(4)

NAME
packingrules - packing rules file for cachefs and filesync SYNOPSIS
$HOME/.packingrules DESCRIPTION
$HOME/.packingrules is a packing rules file for filesync and cachefspack. $HOME/.packingrules contains a list of directories and files that are to be packed and synchronized. It also contains a list of directories and files that are to be specifically excluded from pack- ing and synchronization. See filesync(1) and cachefspack(1M). The $HOME/.packingrules file is automatically created if users invoke filesync with filename arguments. By using filesync options, users can augment the packing rules in $HOME/.packingrules. Many users choose to manually create the packing rules file and edit it by hand. Users can edit $HOME/.packingrules (using any editor) to permanently change the $HOME/.packingrules file, or to gain access to more powerful options that are not available from the command line (such as IGNORE commands). It is much easier to enter complex wildcard expressions by editing the $HOME/.packingrules file. Blank lines and lines that begin with a pound sign (`#') are ignored. Any line can be continued by placing a backslash (`') immediately before the NEWLINE. All other lines in the $HOME/.packingrules file have one of the following formats: PACKINGRULES major. minor. This line is not actually required, but it should be the first line of every packing rules file. This line identifies the packing rules file for the file(1) command and specifies a format version number. The current version number is 1.1. See file(1). BASE directory-1 [directory-2] This line identifies a directory (or pair of directories) under which files should be packed and synchro- nized. At least one directory name must be specified. For rules that are to be used by filesync a second directory name (where the copies are to be kept) must also be specified. The arguments must be fully quali- fied path names, and may include environment variables. LIST name ... This line enumerates a list of files and sub-directories (beneath the current BASE) that are to be kept synchronized. This specification is recursive, in that specifying the name of a directory automatically includes all files and subdirectories it contains. Regular expressions (as described in glob and gmatch) are permitted. See glob(1) and gmatch(3GEN). IGNORE name ... This line enumerates a list of files that are not to be kept synchronized. Regular expressions (using glob and gmatch) are permitted. There are important differences between the arguments to LIST and IGNORE statements. The arguments to a LIST statement can contain slashes and are interpreted as file names relative to the BASE directories. The arguments to an IGNORE statement are simpler names or expressions that cannot contain slashes. An IGNORE statement will not override a LIST statement. IGNORE statements only exclude files that are found beneath LISTed directories. If the first name argument to a LIST statement begins with an exclamation point (`!'), the remainder of the statement will be executed as a command. The command will be run in the current BASE directory. The output of the command will be treated as a list of newline separated file names to be packed/synchronized. The resulting file names will be interpreted relative to the enclosing BASE directory. If the first name argument to an IGNORE statement begins with an exclamation point (`!'), the remainder of the statement will be executed as a command. The command will be run in the current BASE directory. The command will be expected to figure out which names should not be synchronized. The output of the command will be treated as a list of newline separated file names that should be excluded from the packing and synchronization list. Commands will be broken into distinct arguments and run directly with sh -c. Blanks can be embedded in an argument by escaping them with a backslash (`') or enclosing the argument in double quotes (` " '). Double quotes can be passed in arguments by escaping the double quotes with a backslash (`'). LIST lines only apply to the BASE statement that precedes them. IGNORE lines can appear before any BASE statement (in which case they apply to all BASEs) or after a BASE statement (in which case they only apply to the BASE that precedes them). Any number of these statements can occur in any combination. The order is not important. EXAMPLES
Example 1: A sample $HOME.packingrules file. The use of these statements is illustrated in the following $HOME.packingrules file. # # junk files, not worth copying # IGNORE core *.o *.bak *% # # most of the stuff I want to keep in sync is in my $HOME # BASE /net/bigserver/export/home/myname $HOME # everything in my work sub-directory should be maintained LIST work # a few of my favorite mail boxes should be replicated LIST m/incoming LIST m/action LIST m/pending # # I like to carry around a couple of project directories # but skip all the postscript output # BASE /net/bigserver/export/projects $HOME/projects LIST poindexter epiphany IGNORE *.ps # # the foonly package should always be kept on every machine # BASE /net/bigserver/opt/foonly /opt/foonly LIST !cat .packinglist # # and the latest executables for the standard build environment # BASE /net/bigserver/export/buildenv $HOME/buildenv LIST !find . -type f -a -perm -111 -a -print SEE ALSO
file(1), filesync(1), cachefspack(1M) SunOS 5.10 23 Dec 1996 packingrules(4)
All times are GMT -4. The time now is 05:04 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy