03-16-2010
Quote:
Originally Posted by
stateperl
I'm afraid I couldn't get 5th column?
I think these symbols "" messing up a bit. Could you please assume input with out "
...
You don't have the 5th string in your printf statement near the end of the program.
The line # 65 in the Perl program of my earlier post is the one missing.
The printf function at line 60 has the format masks for 6 strings, and those strings are typed, one per line, from line 61 through 66.
tyler_durden
Last edited by durden_tyler; 03-16-2010 at 02:48 PM..
9 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Hi,
I have two files that I need to find difference between. Do I use diff or join? If join, how do I use it?
thanks,
webtekie (1 Reply)
Discussion started by: webtekie
1 Replies
2. Shell Programming and Scripting
Greetings, all. I've got a project that requires I join two data files together, then do some processing and output. Everything must be done in a shell script, using standard unix tools. The files look like the following:
File_1
Layout:
Acct#,Subacct#,Descrip
Sample:
... (3 Replies)
Discussion started by: rjlohman
3 Replies
3. Shell Programming and Scripting
i have three files
file a has contents
123
234
238
file b has contents
189
567
567
and file c has contents
qwe
ert
ery (1 Reply)
Discussion started by: tomjones
1 Replies
4. Shell Programming and Scripting
Hi guys,
I have three files which needs to be joined to a single file.
File 1:
Col a, Col b, Col c
File 2:
Col 1a, Col 1b
File 3:
Col 2a, Col 2b
Output:
Col 1a, Col 2a, Col a, Col b, Col c.
All the files are comma delimited. I need to join Col b with Col 1b and need to... (17 Replies)
Discussion started by: mac4rfree
17 Replies
5. UNIX for Dummies Questions & Answers
I have two comma separated files.
I want to join those filesa nd put the result in separate file.
smaple data are:
file1:
A1,1,100
A2,1,200
B1,2,100
B2,2,200
file2
1,50
1,25
1,25
1,100
1,100
2,50
2,50 (10 Replies)
Discussion started by: pandeesh
10 Replies
6. Shell Programming and Scripting
Hi experts,
I'm quite newbie here!!
I have two seperate files. Contents of file like below
File 1:
6213019212001 8063737
File:2
15703784
I want to join these two files into one where content will be
File 3:
6213019212001 8063737 15703784
Regards,
Ray Seilden (1 Reply)
Discussion started by: RayanS
1 Replies
7. Shell Programming and Scripting
Hi,
I have about 20 tab delimited text files that have non sequential numbering such as:
UCD2.summary.txt
UCD45.summary.txt
UCD56.summery.txt
The first column of each file has the same number of lines and content. The next 2 column have data points:
i.e UCD2.summary.txt:
a 8.9 ... (8 Replies)
Discussion started by: rrdavis
8 Replies
8. Shell Programming and Scripting
File "A" (column names: Nickname Number GB)
Nickname Number GB
PROD_DB0034 100A 16
ASMIL1B_DATA_003 100B 16
PSPROD_0000 1014 36
PSPROD_0001 100D 223
.....
File "B" (column names: TYPE DEVICE NUMBER SIZE)
TYPE DEVICE NUMBER SIZE
1750500 hdisk2 100A 16384
1750500 hdisk3 ... (4 Replies)
Discussion started by: Daniel Gate
4 Replies
9. Shell Programming and Scripting
I have two files with the below contents :
sampleoutput3.txt
20150202;hostname1
20150223;hostname2
20150716;hostname3
sampleoutput1.txt
hostname;packages_out_of_date;errata_out_of_date;
hostname1;11;0;
hostnamea;12;0;
hostnameb;11;0;
hostnamec;95;38;
hostnamed;440;358;... (2 Replies)
Discussion started by: rahul2662
2 Replies
LEARN ABOUT MOJAVE
git-sh-setup
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 GIT_REFLOG_ACTION environment to a given string (typically the name of the program) unless it is already set. Whenever the script
runs a git command that updates refs, a reflog entry is created using the value of this string to leave the record of what command
updated the 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 2.17.1 10/05/2018 GIT-SH-SETUP(1)