10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Bash version 4.4.20 / Ubuntu 16.0.4
Hello,
I tried to write a script that gathers some data and passes them to an executable.
The executed application answers with an error. The echo output in the script returns correct values.
If I copy/paste the last echo command, it get's executed... (2 Replies)
Discussion started by: sushi2k7
2 Replies
2. Shell Programming and Scripting
Hello,
I am processing text files looking for a string and replacing the first occurrence of the string with something else.
For the text,id Name
1 methyl-(2-methylpropoxy)-oxoammonium
2 N-amino-N-(methylamino)-2-nitrosoethanamine
3 3-methoxy-3-methyloxazolidin-3-ium... (12 Replies)
Discussion started by: LMHmedchem
12 Replies
3. Shell Programming and Scripting
Hello,
I have a (basic I guess) problem with bash scripting.
In the command line, this piece of code returns nothing (a blank line), and if I'm not worng it should return 3.
set VAR = "3"
echo $VAR
if I do this (also in command line), a zero is returned:
set VAR = 3
printf "%d"... (4 Replies)
Discussion started by: jlseminara
4 Replies
4. Shell Programming and Scripting
My script work on Linux but not work in sun os.
my script.
logFiles="sentLog1.log sentLog2.log"
intial_time="0 0"
logLocation="/usr/local/tomcat/logs/"
sleepTime=600
failMessage=":: $(tput bold)Log not update$(tput rmso) = "
successMessage="OK"
arr=($logFiles)... (7 Replies)
Discussion started by: ooilinlove
7 Replies
5. Shell Programming and Scripting
Hi, this is my script:
#!/bin/bash
trabajo=$1
numero=`jobs | grep -n $trabajo | cut -d':' -f1`
echo $trabajo
echo $numero
kill %$numero
wait
For some reason,
numero=`jobs | grep -n $trabajo | cut -d':' -f1`
that line wont save in numero the number I am looking for BUT if I write it... (7 Replies)
Discussion started by: lamachejo
7 Replies
6. Shell Programming and Scripting
...
declare vINIFILE
vINIFILE=$1
...
echo "The name of the File is $vINIFILE" >>mail_tmp
echo "" >> mail_tmp.$$
...
grep RUNJOB=0 $vINIFILE >>tmp_filter
...
So the strange is in echo-statement I get the correct output for $vINIFILE wrtitten into the file mail_tmp. But the... (2 Replies)
Discussion started by: ABE2202
2 Replies
7. Shell Programming and Scripting
Hi....
cd command is not working when dual string drive/volume name is passed to cd through variables.......
For Ex....
y=/Volumes/Backup\ vipin/
cd $y
the above command gives error.......
anyone with a genuine solution ? (16 Replies)
Discussion started by: vipinchauhan222
16 Replies
8. UNIX for Dummies Questions & Answers
I am trying to write a simple script which will take a variable with sed to take a line out of a text and display it
#!/bin/sh
exec 3<list
while read list<&3
do
echo $list
sed -n '$list p'<list2
done
this does not work, yet when I replace the $list variable from the sed command and... (1 Reply)
Discussion started by: MaestroRage
1 Replies
9. UNIX for Advanced & Expert Users
My first post here...
I cannot get variables to work when using inline KSH commands on a "su" command. I have a KSH script, below, that produces my problem:
#!/usr/bin/ksh
su <user_id> <<-END
export FLD1=`echo $PWD`
pwd
echo $FLD1
echo TEST
echo $PWD
END
The script will prompt me... (3 Replies)
Discussion started by: joekreif
3 Replies
10. UNIX for Dummies Questions & Answers
Howdie everyone...
I have a shell script RemoveFiles.sh
Inside this file, it only has two commands as below:
rm -f ../../reportToday/temp/*
rm -f ../../report/*
My problem is that when i execute this script, nothing happened. Files remained unremoved. I don't see any error message as it... (2 Replies)
Discussion started by: cheongww
2 Replies