10 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
Hi All,
I am trying to extract only characters from a string value eg: abcdedg1234.cnf
How can I extract only characters abcdedg and assign to a variable.
Please help.
Thanks (2 Replies)
Discussion started by: abhi_123
2 Replies
2. Shell Programming and Scripting
Hi,
I have a log file which is the output from a xml script :
<?xml version="1.0" ?>
<!DOCTYPE svc_result SYSTEM "MLP_SVC_RESULT_320.DTD">
<svc_result ver="3.2.0">
<slia ver="3.0.0">
<pos>
<msid type="MSISDN" enc="ASC">8093078040</msid>
<poserr>
... (4 Replies)
Discussion started by: arjunstarz
4 Replies
3. UNIX for Dummies Questions & Answers
Hi,
I have a file that looks something like
>1-18*anc... (12 Replies)
Discussion started by: jyu429
12 Replies
4. Shell Programming and Scripting
Hi Team
I have an huge xml where i need to search for a ceratin numbers. For example
2014-05-06 15:15:41,498 INFO WebContainer : 10 CommonServicesLogs - CleansingTriggerService.invokeCleansingService Entered PUBSUB NOTIFY MESSAGE () -
<?xml version="1.0" encoding="UTF-8"... (5 Replies)
Discussion started by: Kannannair
5 Replies
5. Shell Programming and Scripting
Need Assistance in shell programming... I have a huge file which has multiple stations and i wanted to search particular station and extract few lines from it and the rest is not needed
Bold letters are the stations . The whole file has multiple stations .
Below example i wanted to search... (4 Replies)
Discussion started by: ajayram_arya
4 Replies
6. Shell Programming and Scripting
Hi,
I have a unix file with contents as below
Line1: ABC MNN X$$QWERTY$$ JKL
Line2: HELLO $$HOW$$ ARE $$YOU$$ DOING
i want to extract the string between $$ and $$ ie i want the output as QWERTY
HOW YOU
i want those strings seperated by some character say |
desired output is... (7 Replies)
Discussion started by: vinredmac
7 Replies
7. Shell Programming and Scripting
How would I accomplish this if I want to test to see if it
1) starts with a dash so something like "-R"
AND
2) starts with 1 character then either a "-" or "+" and then up to 3 characters such as "a+rx" (3 Replies)
Discussion started by: mkjp2011
3 Replies
8. Shell Programming and Scripting
Hi Friends,
I have a script which returns me the following values line by line
ora_smon_RCAT102
oracleKHP102B (DESC
oraclePROOIDDB92 (DES
oraclePMS (DESCRIP
oracleBRIO (LOCAL=N
oracleBRIO (LOCAL=N
oraclePRDB92 (DES
oracleBRIO (LOCAL=N
oracleBRIO (LOCAL=N
oraclePMS (DESCRIP... (4 Replies)
Discussion started by: orakhan
4 Replies
9. Shell Programming and Scripting
Hi, guys. I have one question:
I need to search for a string in a file, and then extract another string from the file and assign it to a variable.
For example:
the contents of the file (group) is below:
...
ftp:x:23:
mail:x:34
...
testing:x:2001
sales:x:2002
development:x:2003
...... (6 Replies)
Discussion started by: daikeyang
6 Replies
10. Shell Programming and Scripting
I want to extract a string from a line in a text file between two different characters:
for example:
:string"
I want to extract string. It has to be done in a one-liner. (11 Replies)
Discussion started by: rein
11 Replies
GIT-SH-SETUP(1) Git Manual GIT-SH-SETUP(1)
NAME
git-sh-setup - Common Git shell script setup code
SYNOPSIS
. "$(git --exec-path)/git-sh-setup"
DESCRIPTION
This is not a command the end user would want to run. Ever. This documentation is meant for people who are studying the Porcelain-ish
scripts and/or are writing new ones.
The git sh-setup scriptlet is designed to be sourced (using .) by other shell scripts to set up some variables pointing at the normal Git
directories and a few helper shell functions.
Before sourcing it, your script should set up a few variables; USAGE (and LONG_USAGE, if any) is used to define message given by usage()
shell function. SUBDIRECTORY_OK can be set if the script can run from a subdirectory of the working tree (some commands do not).
The scriptlet sets GIT_DIR and GIT_OBJECT_DIRECTORY shell variables, but does not export them to the environment.
FUNCTIONS
die
exit after emitting the supplied error message to the standard error stream.
usage
die with the usage message.
set_reflog_action
set the message that will be recorded to describe the end-user action in the reflog, when the script updates a ref.
git_editor
runs an editor of user's choice (GIT_EDITOR, core.editor, VISUAL or EDITOR) on a given file, but error out if no editor is specified
and the terminal is dumb.
is_bare_repository
outputs true or false to the standard output stream to indicate if the repository is a bare repository (i.e. without an associated
working tree).
cd_to_toplevel
runs chdir to the toplevel of the working tree.
require_work_tree
checks if the current directory is within the working tree of the repository, and otherwise dies.
require_work_tree_exists
checks if the working tree associated with the repository exists, and otherwise dies. Often done before calling cd_to_toplevel, which
is impossible to do if there is no working tree.
require_clean_work_tree <action> [<hint>]
checks that the working tree and index associated with the repository have no uncommitted changes to tracked files. Otherwise it emits
an error message of the form Cannot <action>: <reason>. <hint>, and dies. Example:
require_clean_work_tree rebase "Please commit or stash them."
get_author_ident_from_commit
outputs code for use with eval to set the GIT_AUTHOR_NAME, GIT_AUTHOR_EMAIL and GIT_AUTHOR_DATE variables for a given commit.
create_virtual_base
modifies the first file so only lines in common with the second file remain. If there is insufficient common material, then the first
file is left empty. The result is suitable as a virtual base input for a 3-way merge.
GIT
Part of the git(1) suite
Git 1.8.3.1 06/10/2014 GIT-SH-SETUP(1)