9 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi I have a script which runs the isql command and takes the output in a xls file.
Is there a way to trim the spaces(leading and trailing) from all the values in the column of the xls sheet? (6 Replies)
Discussion started by: Sharma331
6 Replies
2. Shell Programming and Scripting
Hello,
I have currently coded a bash script below in which it does the following:
# Archives compressed file from another location.
Basically it moves *.gz files to another location.
The script also sends an email whenever a new compressed file is placed. This is the issue that i... (5 Replies)
Discussion started by: Wizard_1979
5 Replies
3. Shell Programming and Scripting
How do i avoid multiple ssh -o StrictHostKeychecking=no in the below script.
if
then
echo " Please mention the server name after the script"
elif ssh -o StrictHostKeychecking=no $1 "" 2> /dev/null
then
ver=`ssh -o StrictHostKeychecking=no $1 "cat /abc/def/version" 2> /dev/null`
env=`ssh... (3 Replies)
Discussion started by: NarayanaPrakash
3 Replies
4. Shell Programming and Scripting
consider the small piece of code
while read line
do
echo $line
done < example
content of example file
sadasdasdasdsa erwerewrwr ergdgdfgf rgerg erwererwr
the output is like
sadasdasdasdsa erwerewrwr ergdgdfgf rgerg erwererwr
the... (4 Replies)
Discussion started by: Kesavan
4 Replies
5. Shell Programming and Scripting
Hi,
I have a test.txt and would like to put in a different file but while putting in the other file, blank spaces are missing.
$ indicates blank spaces
filename: test.txt:
USA$$$840$$$$
Desired output
USA$$$840$$$$
Current output as per the following code.
while read j;
do... (3 Replies)
Discussion started by: techmoris
3 Replies
6. Shell Programming and Scripting
Sometimes we need a single instance of a script to run at a time. Meaning, the script itself should detects whether any instances of himself are still running and act accordingly.
When multiple instances of one script running, it’s easy to cause problems. I’ve ever seen that about 350 instances... (4 Replies)
Discussion started by: edenCC
4 Replies
7. Shell Programming and Scripting
Hi,
How can I avoid multiple 'cat while read ....? in my script.
In my script, I am taking the inputs from the temp text file and doing the
(
cat while read input
do
...
...
done
)
task and deleting later.
I know it'll raise the perfomance issue. How to avoid this? (2 Replies)
Discussion started by: sharif
2 Replies
8. Shell Programming and Scripting
Hi,
I have a file which contains as follows,
a.tmp
Test \13\
Hello
When i read the file and print the ouput using echo, "\" is not coming. How to avoid it.
here goes the script
a.sh
-----
while read line
do
echo $line
done < a.tmp
Output is:
Test 13 (3 Replies)
Discussion started by: tc.omkumar
3 Replies
9. Shell Programming and Scripting
While concatenating 2 values, one which expanded to fixed width & other not, I am not getting value expanded as fixed width.
Following is script for the same :
#!/bin/sh
var1="abc"
var2="def"
var1Fxd=`echo $var1 | awk '{printf("%-6s",$0)}'`
echo $var1Fxd""$var2
But, if I try -
echo... (2 Replies)
Discussion started by: videsh77
2 Replies