Sponsored Content
Full Discussion: My first script
Top Forums Shell Programming and Scripting My first script Post 302689021 by shadow.wodahs on Monday 20th of August 2012 05:16:27 PM
Old 08-20-2012
My first script

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
 

5 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

create a shell script that calls another script and and an awk script

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)
Discussion started by: magikminox
0 Replies

2. Shell Programming and Scripting

Script will keep checking running status of another script and also restart called script at night

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)
Discussion started by: ketanraut
1 Replies

3. UNIX for Dummies Questions & Answers

Calling a script from master script to get value from called script

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)
Discussion started by: Raj Roy
2 Replies

4. Shell Programming and Scripting

Shell script works fine as a standalone script but not as part of a bigger script

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)
Discussion started by: ektubbe
2 Replies

5. Shell Programming and Scripting

How to block first bash script until second bash script script launches web server/site?

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)
Discussion started by: siegfried
3 Replies
ti(1)							      General Commands Manual							     ti(1)

NAME
ti -- issue tracking system built on Git SYNOPSIS
ti COMMAND [ARGUMENTS] DESCRIPTION
ti, short for ticgit, is an issue tracker based on the Git revision control system. It allows you to store bugs in your project in a sepa- rate ticgit or ticgit-ng branch of its development repository, thereby keeping open issues close to the source without cluttering the tree. Every ticket consists of the following information: Title A short summary of the problem. This can be compared to the subject of an e-mail or to the first line of a Git commit message. Ticket ID The Ticket ID (TicId) is the SHA-1 hash of the file which holds the ticket name (which is a normalized form of the title includ- ing the time of ticket creation and a small random number). It is used to uniquely identify a ticket. Number Apart from TicIds, tickets can also be referred to by using their number. This will often be preferred to TicIds when using ticgit from the command line (i.e., in everyday work), but ticket numbers are not persistent (they change with every ti list invocation). In the current version of ticgit, ti list does not show numbers any more, but they can still be used (by counting manually). State A ticket can either be open, resolved, invalid or put on hold. Assignment The e-mail address of the person working on the ticket. Tag A custom label which tells more about the nature of a ticket. A typical example is feature (not a bug, but a feature sugges- tion). ticgit associates no special semantics to tags, you are free to choose them however you like. Tickets can have an arbitrary number of tags. Points You can use this integer value to assign some numerical value, such as a measure for the importance, to each ticket. Again, ticgit does not dictate how to use this field. Comments Comments provide a simple form of communication between bug reporters and developers. COMMANDS
ti supports the following commands: list List tickets. By default, only open issues are shown; to show tickets in other states, use -s STATE. You can also select by tag (-t TAG) or by assignment (-a ADDRESS). When running list, small integer numbers will be assigned to all shown tickets; you may use them to refer to tickets in other commands until you call list again. state Pass a ticket ID and a state specification to set the ticket's state information. You can omit the ticket ID to work on the cur- rent ticket. show Show everything known about the specified ticket. You can omit the ticket ID to show the current ticket. new Create a new ticket. This will launch an editor to let you enter a title, more detailled information about the issue, and some tags. Initially, the ticket will be in the open state. checkout Set the current ticket. comment Add a comment to the ticket specified on the command line. If you do not pass one, the current ticket will be used. tag Pass a ticket ID and a tag name to add a label to an issue. You can omit the ticket ID to tag the current ticket. If you use the -d option, the tag will be removed instead of added. assign Assign the specified ticket to you (or to the given user, when -u ADDRESS is given). If you omit the ticket ID, the current ticket will be assigned. Otherwise, you can prepend -c to the ticket ID to perform the checkout operation after assigning the ticket. points Pass a ticket ID and some integer to assign a point value to the given ticket. If you only pass a number, this command manipu- lates the current ticket. sync Synchronize tickets with the remote repository specified on the command line. This uses the underlying push and pull command implemented in Git, so you can use your usual named remotes. The default remote is origin. recent Get a human-readable changelog of the tickets maintained by ticgit. This command takes its information straight from the commit messages of the ticgit(-ng) branch. These commands show usage information about themselves when passed the --help option. FILES
~/.ticgit/, ~/.ticgit-ng/ The ticket cache. AUTHOR
ticgit is Copyright (C) 2008 Scott Chacon <schacon@gmail.com>. ticgit-ng is Copyright (C) 2011 Jeff Welling <jeff.welling@gmail.com>. This manual page was written by Michael Schutte for the Debian GNU/Linux system (but may be used by others). ti(1)
All times are GMT -4. The time now is 05:22 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy