9 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
because it gives me this error if?
while read linea
do
#echo "Archivos Entrada: $linea"
largo=`awk '{print length($linea)}'`
echo "largo : $largo "
if ; then #Here's the problem, I take this line and it works
echo "a es igual a 1"
fi... (3 Replies)
Discussion started by: tricampeon81
3 Replies
2. Ubuntu
dear all,
When I start my laptop, I need to run one command /etc/init.open-afs start
and it require sudo privilege.
The only solution which occur to me is to put this command in .bashrc. But then the trouble comes as everytime I open any new tab it ask for the sudo password, which is pretty... (5 Replies)
Discussion started by: emily
5 Replies
3. Shell Programming and Scripting
Hi guys,
I am trying to make a script that will archive all the folders (except NOARCHIVE folder) and then remove those folders:
cd my_specific_folder;
for f in *; do
if ; then
tar czf $f.tar.gz $f && rm -r $f;
fi;
done && echo "All the folders within my_specific_folder are... (3 Replies)
Discussion started by: emanresu
3 Replies
4. Shell Programming and Scripting
Hi Experts ,
I have following code
if ; then
mv path /filename newdirpath
echo "K* files moved successfully to newdirpath \n"
else
echo "K* files DID NOT moved successfully to newdirpath \n"
fi
I am getting
"echo "K* files DID NOT moved successfully to newdirpath \n"... (19 Replies)
Discussion started by: ajaypatil_am
19 Replies
5. Shell Programming and Scripting
Hello,
is it possible to give grep two documents to surche for? like
grep "test" /home/one.txt AND /home/two.txt ?
thanks (1 Reply)
Discussion started by: Cybertron
1 Replies
6. Shell Programming and Scripting
port=$(ssh tms6@$x cat /tms6/scripts/start.lc.sh | grep -P '^\/tms6\/bin\/lc' | cut -d' ' -f3 | cut -b 3-6)
tpsip=$(ssh tms6@$x cat /tms6/scripts/start.lc.sh | grep -P '^\/tms6\/bin\/lc' | cut -d' ' -f4 | cut -b 9-)
# IFS="\n"
set -- $port
... (1 Reply)
Discussion started by: rrd1986
1 Replies
7. Shell Programming and Scripting
I am trying to write a script that runs another script consecutively and records the PID of the called script each time it runs in an array.
I put in an echo statement to check the PID, when the script runs no PID is output, and the array seems to be empty. I assume it is problem with my code,... (3 Replies)
Discussion started by: Breakology
3 Replies
8. Shell Programming and Scripting
Hi Guys
I have this small Bash script - but it fails when I'm trying to run it.
./test.sh: && ; then
# date >> /writable/sys/shutdown.log
shutdown -h "now"
exit
fi
done (4 Replies)
Discussion started by: tainted2real
4 Replies
9. UNIX for Dummies Questions & Answers
Ok so i had to create a file and put some random text into it which i did.
THen u make a script which takes 2 arguments.
The first being a line of text, the second being your newly created file.
The script should take the first argument and insert it into the very top (the first line) of... (1 Reply)
Discussion started by: iago
1 Replies