I'm trying to get this script to work i'm close but there's some wrong any help is welcome. I have a bunch of text files in a directory which are a list of numbers i'm trying to get this script to look for a random number in the list and tell me in which text file that number is.
---------- Post updated at 04:16 PM ---------- Previous update was at 04:15 PM ----------
#looking for a ticket clear echo "Ticket #:" read ticket echo "number entered" "$ticket" echo grep -l "$ticket" /home/ubu/Desktop/jobs/*.txt
Nope i'm justrying to learn some sripting and this the first one i can use myself this is the code : #looking for a ticket clear echo "Ticket #:" read ticket echo "number entered" "$ticket" echo grep -l "$ticket" /home/ubu/Desktop/jobs/*.txt
Soething has gone wrong with your post. The code posted appears to contain html characters and some extra punctuation.
Did you mean:
Ps. In removing various " and semi-colons and also inserting missing line-breaks, I may have fixed the syntax problems by accident.
@Chubler-XL. Posts crossed. Great minds think alike. Comparing our scripts, you lost a "clear" and I lost an "echo" !
@shadow.wodahs . Line breaks, character spacing and character sets are critical to successful scripting. A semi-colon can be used as a substitute for a line break, but it often makes scripts unreadable.
Last edited by methyl; 08-20-2012 at 06:39 PM..
Reason: xrefed wrong poster!
yes i did. Well it gives me the list of all text files in the folder but i just need the one name of the text file where ticket number i'm looking for is. so say i type 7932 and this number is in file.txt but insted of just getting that i get the list of all text files file.txt,file2.txt,file3.txt etc..
I'm new to utilities like socat and netcat and I'm not clear if they will do what I need.
I have a "compileDeployStartWebServer.sh" script and a "StartBrowser.sh" script that are started by emacs/elisp at the same time in two different processes.
I'm using Cygwin bash on Windows 10.
My... (3 Replies)
Hello all,
I am facing a weird issue while executing a code below -
#!/bin/bash
cd /wload/baot/home/baotasa0/sandboxes_finance/ext_ukba_bde/pset
sh UKBA_publish.sh UKBA 28082015 3
if
then
echo "Param file conversion for all the areas are completed, please check in your home directory"... (2 Replies)
I am trying to call a script(callingscript.sh) from a master script(masterscript.sh) to get string type value from calling script to master script. I have used scripts mentioned below.
#masterscript.sh
./callingscript.sh
echo $fileExist
#callingscript.sh
echo "The script is called"... (2 Replies)
I am using blow script :--
#!/bin/bash
FIND=$(ps -elf | grep "snmp_trap.sh" | grep -v grep) #check snmp_trap.sh is running or not
if
then
# echo "process found"
exit 0;
else
echo "process not found"
exec /home/Ketan_r /snmp_trap.sh 2>&1 & disown -h ... (1 Reply)
Hi guys
I have a shell script that executes sql statemets and sends the output to a file.the script takes in parameters executes sql and sends the result to an output file.
#!/bin/sh
echo " $2 $3 $4 $5 $6 $7
isql -w400 -U$2 -S$5 -P$3 << xxx
use $4
go
print"**Changes to the table... (0 Replies)