10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi All,
sessionid_remote=$(echo "select odb_sessionid from sysopendb where odb_dbname='syscdr';" | sudo -u cucluster ssh ucbu-aricent-vm93 "source /opt/cisco/connection/lib/connection.profile; $INFORMIXDIR/bin/dbaccess sysmaster@ciscounity")
for sid in $sessionid_remote;do
if * ]];... (2 Replies)
Discussion started by: deeptis
2 Replies
2. Shell Programming and Scripting
I'm trying to write a basic bash script that takes input you give (what directory, if any, what name, if any ....) and passes the information to find.
I'm trying to just create a string with all variables and then pass it to find. So far I have this extremely simple:
#!/bin/bash -f
... (2 Replies)
Discussion started by: Starting_Leaf
2 Replies
3. Shell Programming and Scripting
Hi all,
I have used a bash script which ultimately converts a string into date using date --date option:
DATE=$DATE" "$TIME" "`date +%Y` //concatenating 2 strings
TMRW_DATE=`date --date="$DATE" +"%s"` //applying date command on string and getting the unixtime
Please use code tags... (7 Replies)
Discussion started by: Rashu123
7 Replies
4. Shell Programming and Scripting
Hi,
I've been stuck for several days on this. Using grep on a command line, I can use quotes, eg...
grep 'pattern of several words' filename
I want to do this in my bash script. In my script I have captured the several command line arguments (eg arg1 arg2) into a variable:
variable=$@
I... (2 Replies)
Discussion started by: adrian777uk
2 Replies
5. UNIX for Dummies Questions & Answers
Hi All,
I am trying to to compare a string variable with a string literal inside a loop but keep getting the
./testifstructure.sh: line 6:
#!/bin/sh
BOOK_LIST="BOOK1 BOOK2"
for BOOK in ${BOOK_LIST}
do
if
then echo '1'
else
echo '2'
fi
done
Please use next... (1 Reply)
Discussion started by: daveu7
1 Replies
6. UNIX for Dummies Questions & Answers
Hello,
Why is this not working in a script?
files="test.fsa"
echo $files
for file in $files
do
if
then
echo "$file does not exist."
fi
run a command
done
I get an error saying (3 Replies)
Discussion started by: verse123
3 Replies
7. Shell Programming and Scripting
Hi,
I have the following requirement.
There will be following text/line in a file (eg: search-build.txt)
PRODUCT_VERSION="V:01.002.007.Build1234"
I need to update the incremental build number (eg here 007) every time I give a build through script. I am able to search the string and get... (4 Replies)
Discussion started by: drwatson_droid
4 Replies
8. Shell Programming and Scripting
Hi ,I am trying to assign string to variable ,but it doesn't work
Also could you show me different ways to use grep,(I am trying to get the first,second and first column form file,and I am counting the chars)
let name=`grep "$id" product | cut -c6-20` (25 Replies)
Discussion started by: lio123
25 Replies
9. Shell Programming and Scripting
In a bash script I've set a variable that is the directory name of where an executable lives.
the_dir=`dirname $which myscript`
which equates to something like "/path/to/dir/bin"
I need to cut that down to remove the "bin" so I now have "/path/to/dir/".
This sounds easy but as a... (2 Replies)
Discussion started by: Witty
2 Replies
10. Shell Programming and Scripting
Hello All. I am very new to Linux and I am currently interning. I have been working on a project for 2 weeks now and I have had no success. I have to convert bash shell into perl to decrypt and store files. Here is the code in Linux and Bash. Any help would be greatly appreciated.
$... (0 Replies)
Discussion started by: freak
0 Replies