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)
Below are the content of my file and i need to extract the 6 digit numbers after the word barcode, how can i do this?
for example i need to extract 004119,004275,004030 to a new file.
Logically move media ID 004119 (barcode 004119) from standalone to slot 18.
Logically move media ID 004275... (9 Replies)
continuing from my previous post, whose link is given below as a reference
https://www.unix.com/shell-programming-scripting/171076-shell-scripting.html#post302573569
consider there is create table commands in a file for eg:
CREATE TABLE `Blahblahblah` (
`id` int(11) NOT NULL... (2 Replies)
Hi,
Here is my question,
I need to extract string between two underscores from the filename
for example, filename is
atmos_8xdaily_instant_300x300_1_12.nc
what I want to extract is 300x300.
There are many such files in my directory, so I guess the code should be like:
for file... (7 Replies)
Hi i am having a logfile which contain lot of entires, but i need extract a word after if i found a line that contains a particular string as "ENROLLMENT_EXCEPTION - Exception". please help me in getting a script to do this.
Regards
C. Suresh (5 Replies)
I have a file with below contents.
INCLUDE
INCLUDE SYSLIB(SANJ)
INCLUDE SYSLIB(BIS)
NAME BQTFL(R)
dfdg fgbb NAME B
i want to grep for "INCLUDE SYSLIB" in the file and do some operation so that my output will be in the bracketed value as below.
SANJ
BIS
Pls let me know how can i... (7 Replies)
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)
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)
Hello guys,
I have problem with hpux shell script. I have one big text file that contains like
SOH
bla bla bla
bla bla bla
ETX SOH
bla bla bla
ETX
SOH
bla bla bla
ETX
What I need to do is save first SOH*BLA into file1.txt, save second SOH*BLA into file2.txt and so on.... (17 Replies)
Discussion started by: sembii
17 Replies
LEARN ABOUT SUSE
git-symbolic-ref
GIT-SYMBOLIC-REF(1) Git Manual GIT-SYMBOLIC-REF(1)NAME
git-symbolic-ref - Read and modify symbolic refs
SYNOPSIS
git symbolic-ref [-q] [-m <reason>] <name> [<ref>]
DESCRIPTION
Given one argument, reads which branch head the given symbolic ref refers to and outputs its path, relative to the .git/ directory.
Typically you would give HEAD as the <name> argument to see which branch your working tree is on.
Given two arguments, creates or updates a symbolic ref <name> to point at the given branch <ref>.
A symbolic ref is a regular file that stores a string that begins with ref: refs/. For example, your .git/HEAD is a regular file whose
contents is ref: refs/heads/master.
OPTIONS -q, --quiet
Do not issue an error message if the <name> is not a symbolic ref but a detached HEAD; instead exit with non-zero status silently.
-m
Update the reflog for <name> with <reason>. This is valid only when creating or updating a symbolic ref.
NOTES
In the past, .git/HEAD was a symbolic link pointing at refs/heads/master. When we wanted to switch to another branch, we did ln -sf
refs/heads/newbranch .git/HEAD, and when we wanted to find out which branch we are on, we did readlink .git/HEAD. This was fine, and
internally that is what still happens by default, but on platforms that do not have working symlinks, or that do not have the readlink(1)
command, this was a bit cumbersome. On some platforms, ln -sf does not even work as advertised (horrors). Therefore symbolic links are now
deprecated and symbolic refs are used by default.
git symbolic-ref will exit with status 0 if the contents of the symbolic ref were printed correctly, with status 1 if the requested name is
not a symbolic ref, or 128 if another error occurs.
AUTHOR
Written by Junio C Hamano <gitster@pobox.com[1]>
GIT
Part of the git(1) suite
NOTES
1. gitster@pobox.com
mailto:gitster@pobox.com
Git 1.7.1 07/05/2010 GIT-SYMBOLIC-REF(1)