10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Friends,
I have more than 1000 lines in text file which needs to be converted as UPPERCASE by adding _
com.sun.url=www.sun.com
com.ssl.port=808
com.ui.path=/apps/ssi
Expected output
com.sun.url=_COM.SUN.URL_
com.ssl.port=_COM.SSL.PORT_
com.ui.path=_COM.UI.PATH_
Thanks in... (4 Replies)
Discussion started by: baluchen
4 Replies
2. Shell Programming and Scripting
I want to make a script which takes the number of argument, add those argument and gives output to the user, but I am not getting through...
Script that i am using is below :
#!/bin/bash
sum=0
for i in $@
do
sum=$sum+$1
echo $sum
shift
done
I am executing the script as... (3 Replies)
Discussion started by: mukulverma2408
3 Replies
3. Shell Programming and Scripting
Hello
My question is: How to find out the shell of the shell script which we are running? I am writing a script, say f1.sh, as below:
#!/bin/ksh
echo "Sample script"
From the first line, we can say this script will run in ksh. But, how can we prove it? Can we print anything inside... (6 Replies)
Discussion started by: guruprasadpr
6 Replies
4. Shell Programming and Scripting
Right, noob to shell scripting, playing a round for practice, wrote the following but it doesn't seem to work as expected, how could I fix/improve this script?
#!/bin/bash
#set -v
#set -x
case $# in
1)
echo Searching for $1 in '*';
find . -iname '*' 2>/dev/null | xargs grep "$1" -sl... (3 Replies)
Discussion started by: Pezmc
3 Replies
5. Shell Programming and Scripting
hi
I am a newbee in Shell scripting (hardly 7 days)
I have to execute a shell script which looks like this
#!/bin/sh
var1=`date +"%Y%m%d"`
echo $var1
find . -name "$var1*" -exec mv {} Delete/ \;
the find command in the script is running independently but when kept in this script it is... (24 Replies)
Discussion started by: sweetnsourabh
24 Replies
6. Shell Programming and Scripting
Hi,
dirs.conf fine contains below data
/a/b/c/dir1|50
/a/b/c/dir2|50
/a/b/c/dir3|50
In a shell script I do as below
while read file_rec
do
dir_name=`echo "${file_rec}" | cut -d "|" -f 1`
purge_days=`echo "${file_rec}" | cut -d "|" -f 2`
if
then... (3 Replies)
Discussion started by: icefish
3 Replies
7. UNIX for Dummies Questions & Answers
hi guys,
may i know the difference of find,locate and whereis ? (3 Replies)
Discussion started by: cromohawk
3 Replies
8. Shell Programming and Scripting
Okie here is my problem,
1. I have a directory with a ton of files.
2. I want to first get an input on how many days ago the files were created.
3. I will take those files and put it into another file
4. Then I will take the last # from each line and subtract by 1 then diff the line from the... (1 Reply)
Discussion started by: bigboizvince
1 Replies
9. Shell Programming and Scripting
Basically I have a shell script and i want to search the computer for a folder and if that folder exists i want to take some action. Not sure exactly how to do this most efficiently.
Not very experienced....any help would be appreciated. (1 Reply)
Discussion started by: meskue
1 Replies
10. UNIX for Dummies Questions & Answers
When I execute the following:
<pre>
$ whereis ls
ls: /usr/bin/ls /usr/ucb/ls
$ pwd
/bin
$ ls -la ls
-r-xr-xr-x 1 bin bin 18120 Oct 6 1998 ls
</pre>
....but as you can see the 'ls' command is in the /bin directory AS WELL. Why doesn't show up on 'whereis'???
Thanks (3 Replies)
Discussion started by: guest100
3 Replies