Hi guys...was trying to use while loop and a sentry to prompt user input again if an invalid option was entered...but somehow I got a "while" unmatched error...The code is as below:
Code:
#!/system/bin/sh
finsh=0
while [ $finish -ne 0 ]
do
echo "Please select an option: "
echo "1. One" echo "2. Two"
echo "3. Three"
echo "4.
Hi guys,i am trying to set up Vim as my C++ IDE since 2 days and no success so far.I have installed Vim pacman -Q vim
vim 7.3.661-1I have downloaded vim-latex and clang tar balls,extract and place appropriate directorys in ~/.vim e.g.
Hi Guys,
I am relatively new to scripting at the moment and am struggling to get the following function to work. For some reason it does not recognise the arithmatic symbol when i select option1. Any help would be greatly appreciated.
Code:
menu ()
{
echo "=============="
echo "Calculator"
echo "=============="
echo "1. Divide"
echo "2.
Hi,
I have a file in the following format
Code:
"SYLVESTER,WILLARD G"|"S00633600"|"221052958A"|"H2256"|"015"|""|"00000042BASJ"|"665303"|"N"|"20100211"|"380.4"|""|""|""|"5400"|"20110218"|""|"20110218"|"FEESC&qu
In python this would be easy:
Code:
if test_var in ["a","b","c"]: print "Yes"
...but is there a way to do the same in bash?
Doomicide wrote:Here's a little bashscript, I wrote out of boredom, inspired by sunjacks' zsh script.http://ompldr.org/vYjVqOQ#!/bin/bash
XFILE="$HOME/.Xdefaults"
COLS="$(cat $XFILE| grep -Ei urxvt[.*]color[01-9] | sort -n -tr -k2 | cut -d: -f2 | tr -d [:blank:])"
for i in {0..7}; do echo -en "\e[0;3${i}m ▉▉ $(echo "$COLS" | sed -n $(($i+1))'p&#
I have a file1.txt
file1.txt
Code:
F-120009210","Felix","U-M-F-F-F-","white","yes","no","U-M-F-F-F-","Bristol","RI","true"
F-120009213","Fluffy","U-F-","white","yes","no","M-F-","Warwick","RI","true"
U-12
Hi
Need help...I have wrritten one code for html through shell scripting in that i am using java scripts to validate some condition and open the html page without clicking the button....
Code Details
Code:
echo "<script type="text/javascript">"
echo "function exec_refresh()"
echo "{"
echo " window.status = "Redi
Hi,
I have a .sh file, to email a report of our backups from a linux machine.