Sponsored Content
Top Forums Shell Programming and Scripting Need quick help with basic FIND in korn shell Post 11148 by Freakytah on Thursday 29th of November 2001 03:55:14 PM
Old 11-29-2001
Need quick help with basic FIND in korn shell

I gotta make a script to find files, not quite sure whats wrong...

filename is search

i run it

search ass* $HOME
ass* is the filename

and in my script i have...

find $2 -name $1 -print

but it never works, anyone know what i gotta fix?

and does anyone know the difference bettwen regular expressions and file expansion char's when it comes to seraching?
i know reg exp is but not expan.
thanks, steve
 

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
RUNNING(1)						      Debian GNU/Linux manual							RUNNING(1)

NAME
docs/running.pod - Running VERSION
$Revision$ OVERVIEW
This document describes Parrot's command line options. SYNOPSIS
parrot [-options] <file> [arguments ...] ENVIRONMENT
PARROT_RUNTIME If this environment variable is set, parrot will use this path as its runtime prefix instead of the compiled in path. PARROT_GC_DEBUG Turn on the --gc-debug flag. OPTIONS
Assembler options -a, --pasm Assume PASM input on stdin. -c, --pbc Assume PBC file on stdin, run it. -d, --imcc-debug [hexbits] The -d switch takes an optional argument which is considered to hold a hex value of debug bits. Without a value, debug is set to 1. The individual bits can be listed on the command line by use of the --help-debug switch. To produce really huge output on stderr run "parrot -d 0ffff ...". Note: If the argument is separated by whitespace from the -d switch, it has to start with a number. -h, --help Print command line option summary. --help-debug Print debugging and tracing flag bits summary. -o outputfile, --output=outputfile Act like an assembler. Don't run code, unless -r is given too. If the outputfile ends with .pbc, a PBC file is written. If it ends with .pasm, a PASM output is generated, even from PASM input. This can be handy to check various optimizations, including "-Op". --output-pbc Act like an assembler, but always output bytecode, even if the output file does not end in .pbc -r, --run-pbc Only useful after "-o" or "--output-pbc". Run the program from the compiled in-memory image. If two "-r" options are given, the .pbc file is read from disc and run. This is mainly needed for tests. -v, --verbose One "-v" shows which files are worked on and prints a summary over register usage and optimization stats per subroutine. With two "-v" switches, "parrot" prints a line per individual processing step too. -y, --yydebug Turn on yydebug in yacc/bison. -V, --version Print version information and exit. -Ox Optimize -O0 no optimization (default) -O1 optimizations without life info (e.g. branches) -O same -O2 optimizations with life info -Op rewrite I and N PASM registers most used first -Ot select fastest runcore -Oc turns on the optional/experimental tail call optimizations See docs/dev/optimizer.pod for more information on the optimizer. Note that optimization is currently experimental and these options are likely to change. -E, --pre-process-only Preprocess source file (expand macros) and print result to stdout: $ parrot -E t/op/macro_10.pasm $ parrot -E t/op/macro_10.pasm | parrot -- - Runcore Options These options select the runcore, which is useful for performance tuning and debugging. See "About runcores" for details. -R, --runcore CORE Select the runcore. The following cores are available in Parrot, but not all may be available on your system: slow, bounds bounds checking core (default) gcdebug performs a full GC run before every op dispatch (good for debugging GC problems) trace bounds checking core w/ trace info (see 'parrot --help-debug') profiling see F<docs/dev/profilling.pod> The "jit", "switch-jit", and "cgp-jit" options are currently aliases for the "fast", "switch", and "cgp" options, respectively. We do not recommend their use in new code; they will continue working for existing code per our deprecation policy. -p, --profile Run with the slow core and print an execution profile. -t, --trace Run with the slow core and print trace information to stderr. See "parrot --help-debug" for available flag bits. VM Options -w, --warnings Turn on warnings. See "parrot --help-debug" for available flag bits. -D, --parrot-debug Turn on interpreter debug flag. See "parrot --help-debug" for available flag bits. --hash-seed <hexnum> Sets the hash seed to the provided value. Only useful for debugging intermittent failures, and harmful in production. --gc-debug Turn on GC (Garbage Collection) debugging. This imposes some stress on the GC subsystem and can slow down execution considerably. -G, --no-gc This turns off GC. This may be useful to find GC related bugs. Don't use this option for longer running programs: as memory is no longer recycled, it may quickly become exhausted. --leak-test, --destroy-at-end Free all memory of the last interpreter. This is useful when running leak checkers. -., --wait Read a keystroke before starting. This is useful when you want to attach a debugger on platforms such as Windows. --runtime-prefix Print the runtime prefix path and exit. -L path Add "path" to the library search path <file> If the file ends in .pbc it will be interpreted immediately. If the file ends in .pasm, then it is parsed as PASM code. Otherwise, it is parsed as PIR code. In both cases, it will then be run, unless the "-o" flag was given. If the "file" is a single dash, input from "stdin" is read. [arguments ...] Optional arguments passed to the running program as ARGV. The program is assumed to know what to do with these. Generated files About runcores The runcore (or runloop) tells Parrot how to find the C code that implements each instruction. Parrot provides more than one way to do this, partly because no single runcore will perform optimally on all architectures (or even for all problems on a given architecture), and partly because some of the runcores have specific debugging and tracing capabilities. In the default "slow" runcore, each opcode is a separate C function. That's pretty easy in pseudocode: slow_runcore( op ): while ( op ): op = op_function( op ) check_for_events() The GC debugging runcore is similar: gcdebug_runcore( op ): while ( op ): perform_full_gc_run() op = op_function( op ) check_for_events() Of course, this is much slower, but is extremely helpful for pinning memory corruption problems that affect GC down to single-instruction resolution. See <http://www.oreillynet.com/onlamp/blog/2007/10/debugging_gc_problems_in_parro.html> for more information. The trace and profile cores are also based on the "slow" core, doing full bounds checking, and also printing runtime information to stderr. Operation table Command Line Action Output --------------------------------------------- parrot x.pir run parrot x.pasm run parrot x.pbc run -o x.pasm x.pir ass x.pasm -o x.pasm y.pasm ass x.pasm -o x.pbc x.pir ass x.pbc -o x.pbc x.pasm ass x.pbc -o x.pbc -r x.pasm ass/run pasm x.pbc -o x.pbc -r -r x.pasm ass/run pbc x.pbc -o x.o x.pbc obj ... where the possible actions are: run ... yes, run the program ass ... assemble sourcefile obj .. produce native (ELF) object file for the EXEC subsystem FILES
main.c Debian Project 2011-09-11 RUNNING(1)
All times are GMT -4. The time now is 09:09 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy