Hello all,
I have a situation where I need to parse for certain items from a $VARIABLE within a sh script.
The sh script is run when an alert comes in.
The alert data payload has a Message field called "EVENTMSG"
The script that is run takes the "EVENTMSG" and prints it out to the ticket.
I need to parse the "EVENTMSG" for additional information.
The line inside th
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&#
while writing a script m not able to convert string into a number therefore it is not picking the write if condition
pls help
Code:
#!/bin/sh
echo "this game is about selecting number and getting lucky"
echo " the number are 1 2 3 4 5 and 0 to exit"
read $a1
if [ "$a1" = 1 ]; then
echo "NUMBER IS NOT CO
here is the screen shot of both the script and output i don't get it??
Hi ,
I have script as follows ,
#!/usr/bin/ksh -x
if [ `uname` = "Linux" ]
then
alias echo="echo -e"
fi
MAX_ENTRIES=1024
nb_of_entries=`echo "$list_of_entries" | wc -w`
# Set number of tables
eval nb_of_tables=\`expr `expr $nb_of_entries / $MAX_ENTRIES` + 1 \`
# Output the number of tables
echo $nb_of_tables
Here "list of entries" is list of PID's and
Hi we are using AIX 5.3 64bit
I have near about 79000 log file having naming convention like "IFTMBCSun Aug 14 07:45:00 PAKST 2011".
This naming convention was created by a script error, now we need to rename these log file by removing extar spaces and (:) colon for that we wrote below script
Code:
ls * | while read file
do
echo $file
echo "$file" | sed "s/[ \:]//g&qu
Hi all
I am trying to write a simple script to make it easy download the Triple J feature album, incorporating rtmpdump and pacpl.
Code:
#!/bin/bash
echo "Directory: "
read directory
cd $directory
echo "xml:"
read xml
grep "rtmp" $xml | tr "[ ]" "[\n]" | grep "rtmp" | sed "s/url=//g" >> .rtmp
for line in
Need to create a list for yad (zenity) from directory listings:
dir-a contains files 1,2,3,4,5,6
dir-b contains files a,b,c,d,e,f
Final list (in a variable) needs to read:
"1" "a" "2" "b" "3" "c" "4" "d" "5" "e" "6" "f"
( For simplicity I will always ensure that &q
Hi all
I am trying to write a simple script to make it easy download the Triple J feature album, incorporating rtmpdump and pacpl.
Code:
#!/bin/bash
echo "Directory: "
read directory
cd $directory
echo "xml:"
read xml
grep "rtmp" $xml | tr "[ ]" "[\n]" | grep "rtmp" | sed "s/url=//g" >> .rtmp
for line in