10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I have this script which is very easy:
file=`echo 01114`
echo $file
01114
then I ran this
if ; then echo "yes";fi
it returned yes even though there are only 5 digits there
So then I tried
file=`echo abcd`
echo $file
abcd
if ]; then echo "yes";fi
if ]; then echo "yes";fi
It... (2 Replies)
Discussion started by: newbie2010
2 Replies
2. Linux
Hi All,
I am trying to find a particular string in a path, but able to do so.
I tried through grep command but its taking so long time which is not appropriate.
e.g:
Path : /oct/oracle/apps/OMEC/appl/xxaterp/1.0/reports/US/
Suppose in this path we have 10 .rdf file and I want to... (2 Replies)
Discussion started by: Vikash163
2 Replies
3. Shell Programming and Scripting
Hi,
I was hoping someone could suggest an alternative to code I currently have as mine takes up far too much processor time and it to slow.
The situation:
I have a programme that runs on some files just before they are zipped up and archived, the program appends a one line summary of the... (4 Replies)
Discussion started by: RECrerar
4 Replies
4. Shell Programming and Scripting
I have some C++ code in the following directory structure
/home/chrisd/tatsh/trunk/hstmy/
├── baseLib
├── bin
│ ├── awk
│ ├── bash
│ ├── diag
│ ├── ksh
│ │ └── TAG201011
│ ├── old
│ ├── perl
│ ├── prog
│ ├── py
│ └── tcsh
├── docs
├── fortran
├── others... (0 Replies)
Discussion started by: kristinu
0 Replies
5. Shell Programming and Scripting
Hi I am using MKS Toolkit c shell.
I want to basically check if my PATH variable already contains a certain path directory so I tried this (it didnt work!): if: Expression Syntax
if ( echo $path |grep -c c:/PROGRA~1/blah/blah ) then
please help me get this little statement to work.
... (3 Replies)
Discussion started by: vas28r13
3 Replies
6. Shell Programming and Scripting
Hi all,
i've a string
$DIR=/u/user/NDE/TEST_LOGS/20110622_000005_TEST_11_HD_120/HD/TEST_11_HD_120/hd-12
i need to extract string from 2011.... i.e i need it as 20110622_000005_TEST_11_HD_120 as matched string, and in turn i need to split values 20110622_000005_TEST_11_HD_120 into two.... (6 Replies)
Discussion started by: asak
6 Replies
7. Shell Programming and Scripting
This is the way
sed -i 's/home/$USER/.config/hello_there//g' /home/$USER/.gnomerc
But, as far as I saw you cannot add any "/" in the string you want to remove....
So, what should I do in order to remove this path (which contains "/") ?:confused: (7 Replies)
Discussion started by: hakermania
7 Replies
8. Shell Programming and Scripting
Hi,
I have a file with the following contents
# Lines that start with a # are comments.
#
# Calling TOAD like this will perform a comparison from command line :
#
# "C:\Program Files\Quest Software\Toad for Oracle 9.6\toad.exe" -c... (2 Replies)
Discussion started by: rajan_san
2 Replies
9. Shell Programming and Scripting
Hello,
I have a script where I get the full directory path of the script being executed:
BASE=$0
echo "BASE:" $BASE
The output looks like this:
BASE: /webapps/appsdev/ACURA/rlz/oses3.sh
I'd like to truncate the shell name, leaving just the directory path. The directory path can be... (2 Replies)
Discussion started by: cwalsek
2 Replies
10. Shell Programming and Scripting
Hey everyone,
I'd like to determine the absolute path of where a script resides from within the same script. For example, I have a script - /tmp/myscript. Regardless of how that script is call - '/tmp/myscript', 'cd /tmp;./myscript', '. /tmp/myscript' - I'd like to be able to determine - from... (5 Replies)
Discussion started by: gsatch
5 Replies