10 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
I have a requirement to read a file ( 5 fields , ~ delimited) and find the records which contain anything other than Alphabets, Numbers , comma ,space and dot . ie a-z and A-Z and 0-9 and . and " " and , in 2nd field. Once I do that i would want the result to have field1|<flag>
flag can... (2 Replies)
Discussion started by: ashwin3086
2. Shell Programming and Scripting
I have the below text file from which I have to cut particular section starting from PTR_Security_Rpeorting.cpf to PTR_Security_Reporting_Env93_export.
Report Model............: "D:\Cognos_Publishing\tmp.a2R94KLQec"\PTR_Security_Reporting.cpf
Report Output Script....:... (4 Replies)
Discussion started by: Vikram_Tanwar12
3. Shell Programming and Scripting
I have a file data_1.out which contains:
1|abc mail|mail subject|mail body
2|def mail|mail subject|def mail body
I am trying to read the variables from data_1.out and use them to print to 2 different files based on the id (first_column)
The problem is I am not able to read the file... (8 Replies)
Discussion started by: sol_nov
4. Shell Programming and Scripting
Dear all, today I'm scratching my head with a simple (I believe) issue.
Working with date is quite simple, so if I Need to add some seconds to current time, I'll use:
date --date='+30 seconds' +"%Y-%m-%d %H:%M:%S"But, how to pass the value to add from a variable? I tried the following without... (2 Replies)
Discussion started by: Lord Spectre
5. Shell Programming and Scripting
I look for a awk one liner for below issue.
ABC 1234 abc 12345
ABC 4567 678 XYZ
xyz ght 678
ABC 787 yyuu
ABC 789 7890 777
zxr hyip hyu
mno uii 678 776
ABC ty7 888
All lines should be started with ABC as first field. If a record has another value for 1st... (7 Replies)
Discussion started by: ratheesh2011
6. Shell Programming and Scripting
I have the solution:
The thread can be marked as solved!
I'm working on a script processing some data from a website into cvs format. There is only one final problem left I can't find a solution.
I've processed my file... (0 Replies)
Discussion started by: lolworlds
7. UNIX for Dummies Questions & Answers
I am a newbie to Linux stuff. I have this kind of problem which couldn't solve alone. I have a text file with records separated by empty lines like this:
I want to grep records that... (4 Replies)
Discussion started by: Atrisa
8. UNIX for Dummies Questions & Answers
I am looking for a method to get column13 to column 50 data from the 1st line of a multiline reord. The records are stored in a large file and are separated by newline. sample format is
(data in red is to be extracted)
A001dfhskhfkdsh hajfhksdhfjh... (3 Replies)
Discussion started by: sunayana3112
9. Shell Programming and Scripting
I am trying to cut the first 10 characters from a file only if the file has 'xyz' in field 185-188.
I tried this
cat filename | cut -c1-10
but this gives me all the records regardless of what is in field 185-188.
Is this doable ?
Thanks in advance for responses. (2 Replies)
Discussion started by: jxh461
10. Shell Programming and Scripting
I have a file which is 5 million records. And each records has 412 fields has delimited by "|". So that makes each records to be 2923 bytes long. I wanted to extract specific records like top 100 or 2500 - 5000, 50001 - 10000 etc. from this file.
I tried using head command for top 100 records,... (1 Reply)
Discussion started by: acheepi
GIT-SH-SETUP(1) Git Manual GIT-SH-SETUP(1)
git-sh-setup - Common git shell script setup code
. "$(git --exec-path)/git-sh-setup"
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.
exit after emitting the supplied error message to the standard error stream.
die with the usage message.
set the message that will be recorded to describe the end-user action in the reflog, when the script updates a ref.
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.
outputs true or false to the standard output stream to indicate if the repository is a bare repository (i.e. without an associated
runs chdir to the toplevel of the working tree.
checks if the repository is a bare repository, and dies if so. Used by scripts that require working tree (e.g. checkout).
outputs code for use with eval to set the GIT_AUTHOR_NAME, GIT_AUTHOR_EMAIL and GIT_AUTHOR_DATE variables for a given commit.
Written by Linus Torvalds <email@example.com>
Documentation by Junio C Hamano and the git-list <firstname.lastname@example.org>.
Part of the git(1) suite
Git 1.7.1 07/05/2010 GIT-SH-SETUP(1)