Can somebody please guide me towards right syntax:
#!/bin/ksh
if i = $(grep $NAME filename)
echo "Name Found"
else
echo " Name not Found"
fi
I need to grep for $NAME in the file, and if it returns false, execute a series of commands and if true, exit out.
The above is not the right... (3 Replies)
Hi All,
I am using grep command to find string "abc" in one file .
content of file is
***********
abc = xyz
def= lmn
************
i have given the below mentioned command to redirect the output to tmp file
grep abc file | sort -u | awk '{print #3}' > out_file
Then i am searching... (2 Replies)
hello experts,
i am trying to replace a line in a 100+mb text file. the structure is similar to the passwd file, id:value1:value2 and so on. using the sed command
sed -i 's/\(123\):\(\{1,\}\):/\1:bar:/' data.txt
works nicely, the line "123:foo:" is replaced by "123:bar:". however, it takes... (7 Replies)
Hi All,
Please can somebody advise that if I want to search a pattern xyz the grep command should only select xyz and not any other pattern containing xyz (ex abxyzcd)
Regards (1 Reply)
Hi,
I have to find out the run time for 40-45 different componets. These components writes in to a genreric log file in a single directory.
eg.
directory is LOG and the log file name format is generic_log_<process_id>_<date YY_MM_DD_HH_MM_SS>.log
i am taking the run time using the time... (3 Replies)
Hi,
I have an array with characters and I am looking for specific character in that array and if those specific character not found than I use goto statment which is define somehwhere in the script. My code is:
set a = (A B C D E F)
@ i = 0
while ($i <= ${#a})
if ($a != "F" || $a != "D")... (3 Replies)
Hello All,
I have 2 different pieces of code, I am confused why the Code1 is giving me the correct result where as the Code2 is not giving me correct result. It gives me always result as "Failure" irrespective of the "ERROR" word exists in logfile or not. may I know the reason why? I am using Bash... (17 Replies)
Below script is used to search numeric data from around 400 files in a folder. I have 300 such folders. Need help in performance improvement in the script.
Below Script searches 20 such folders ( 300 files in each folder) simultaneously. This increases cpu utilization upto 90% What changes... (3 Replies)
Hi folks,
I have a scenario to convert the update statements into insert statements using shell script (awk, sed...) or in database using regex.
I have a bunch of update statements with all columns in a file which I need to convert into insert statements.
UPDATE TABLE_A SET COL1=1 WHERE... (0 Replies)
Discussion started by: dev123
0 Replies
LEARN ABOUT DEBIAN
groovy
GROOVY(1) General Commands Manual GROOVY(1)NAME
Groovy - Agile dynamic language for the Java Virtual Machine
DESCRIPTION
usage: groovy [options] [args] options:
-D,--define <name=value>
define a system property
-a,--autosplit <splitPattern>
automatically split current line (defaults to 's')
-c,--encoding <charset>
specify the encoding of the files
-d,--debug
debug mode will print out full stack traces
-e <script>
specify a command line script
-h,--help
usage information
-i <extension>
modify files in place, create backup if extension is given (e.g. '.bak')
-l <port>
listen on a port and process inbound lines
-n process files line by line
-p process files line by line and print result
-v,--version
display the Groovy and JVM versions
COMMANDS
groovy:
Command to run a set of Groovy statements entered on the command line (with -e), or stored in a text file whose name is given on the
command.
example: groovy -e 'System.in.readLines().each { println it }'
groovysh:
Terminal-based interpreter for Groovy.
groovyConsole:
GUI interpreter for composing Groovy interactively.
java2groovy:
The java2groovy tool reads class and interface definitions, written in the Java programming language, and converts them into groovy
source files.
SEE ALSO groovyc(1)AUTHOR
This manual page was generated using help2man and edited by Varun Hiremath <varun@debian.org>, for the Debian project (but may be used by
others).
December 2007 GROOVY(1)