10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
My first then statement is executing even though there is no match between the variables. each subsequent if then statement is also executing.
Why do they execute when there is no match in the dates?
yr=`date +%y`
date1=12-31-$yr
date=`date +%m-%d-%y`
set -vx
if ;
... (6 Replies)
Discussion started by: bash_in_my_head
6 Replies
2. Shell Programming and Scripting
# cat /tmp/checkdate.log
SQL*Plus: Release 11.2.0.1.0 Production on Mon Sep 17 22:49:00 2012
Copyright (c) 1982, 2009, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.1.0.7.0 - 64bit Production
FIRST_TIME NEXT_TIME... (1 Reply)
Discussion started by: SarwalR
1 Replies
3. Shell Programming and Scripting
Writing a bash script for use with Geektool, pulls the battery info, and shuffles images around so that an Image geeklet can display the correct expression as the desktop background. (Eventually I intend to make it more intricate, based on more variables, and add more expressions)
I'm extremely... (1 Reply)
Discussion started by: The_Ardly374
1 Replies
4. Shell Programming and Scripting
I'm trying to create what (should be) a simple bash script that will pull computer name and use that info to bind to one of three servers. Is there any way to do this without having a text file with the names of the servers and associated computer names? (5 Replies)
Discussion started by: jacobsbigbro1
5 Replies
5. Shell Programming and Scripting
Hi All,
I am trying to alter all lines between EXEC SQL and END-EXEC that have an INCLUDE in them.
The following code
search="INCLUDE "
cp -f ${WORK}/$file.in ${WORK}/$file.wrk2
for item in `echo $search `; do
> ${WORK}/$file.wrk1
awk -vITEM="$item" '{
if ( $0... (3 Replies)
Discussion started by: Bruble
3 Replies
6. Shell Programming and Scripting
Hi Everyone,
Below is the script, i feel there should be more simple way to do the same output, my one works, but feel not nice. like using index i feel it is slow (image my file is very large), maybe awk can do one line code?
Please advice.
# cat 1.txt
1 a
2 b
3 cc
4 d
# cat 1.pl... (6 Replies)
Discussion started by: jimmy_y
6 Replies
7. Shell Programming and Scripting
Can you please help on this?
I am looking for the shell script which does following:-
step 1: It should open the file /u/manish/input/FileIndex.dat and read line by line
step 2: Once first line is read (for ex: File1), we have to find a file, that contains this matching... (4 Replies)
Discussion started by: teteguru1
4 Replies
8. Shell Programming and Scripting
Hi All,
I have a status.txt file which contains following three files.
1.xml
2.xml
3.xml
Now i have written a shell script 1.sh which contains the following
cat status.txt | while read filename
do
echo $filename
case "$filename" in
xml)
echo "running 1.xml"
;;
... (3 Replies)
Discussion started by: sunitachoudhury
3 Replies
9. UNIX for Dummies Questions & Answers
hello
I want to do a pattern match for string in the if statement, but I am not sure how to use regex inside the if statement.
I am looking for something like this:
if {2,3} ]; then
.....
....
...
fi (7 Replies)
Discussion started by: rakeshou
7 Replies
10. UNIX for Dummies Questions & Answers
Hi
I have a script like
read i
if
then
echo bingo
fi
I want to enter the if block if i is equal to *
The same doesn't happen , when I input * the script fails with error "[: too many arguments"
I know it is very basic , but still Could any one help me out with the issue
... (3 Replies)
Discussion started by: sivasenthil_k
3 Replies