Sponsored Content
Full Discussion: Help with a script
Operating Systems Linux Ubuntu Help with a script Post 302843464 by Monkeygrenades on Tuesday 13th of August 2013 11:47:50 AM
Old 08-13-2013
Help with a script

Hello everyone! I am new here, and just started playing with Unix/Ubuntu and started learning scripting just this week. Sorry if the question is so basic Smilie

I have a file that has two columns, in column one I have usernames;
first.last

and in the second column I have the matching real name;
First Last

Some are longer names/usernames than others, so they are not lined up pretty (I did find help on the forum to do that, but my assignment wants it to be a simple space between the user.name and real name)
as an example:
first.last First Last
first1.last1 First1 Last1
firs.lastlast Firs Lastlast

is there a way to make a script that would allow me to prompt the runner of the script for a username for the first column, and a matching "real name" for the second, and have that be appended to the file?

I appriciate the help a great deal. Sorry if the post is a little wordy
~Robert
 

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
sgeqpf.f(3)							      LAPACK							       sgeqpf.f(3)

NAME
sgeqpf.f - SYNOPSIS
Functions/Subroutines subroutine sgeqpf (M, N, A, LDA, JPVT, TAU, WORK, INFO) SGEQPF Function/Subroutine Documentation subroutine sgeqpf (integerM, integerN, real, dimension( lda, * )A, integerLDA, integer, dimension( * )JPVT, real, dimension( * )TAU, real, dimension( * )WORK, integerINFO) SGEQPF Purpose: This routine is deprecated and has been replaced by routine SGEQP3. SGEQPF computes a QR factorization with column pivoting of a real M-by-N matrix A: A*P = Q*R. Parameters: M M is INTEGER The number of rows of the matrix A. M >= 0. N N is INTEGER The number of columns of the matrix A. N >= 0 A A is REAL array, dimension (LDA,N) On entry, the M-by-N matrix A. On exit, the upper triangle of the array contains the min(M,N)-by-N upper triangular matrix R; the elements below the diagonal, together with the array TAU, represent the orthogonal matrix Q as a product of min(m,n) elementary reflectors. LDA LDA is INTEGER The leading dimension of the array A. LDA >= max(1,M). JPVT JPVT is INTEGER array, dimension (N) On entry, if JPVT(i) .ne. 0, the i-th column of A is permuted to the front of A*P (a leading column); if JPVT(i) = 0, the i-th column of A is a free column. On exit, if JPVT(i) = k, then the i-th column of A*P was the k-th column of A. TAU TAU is REAL array, dimension (min(M,N)) The scalar factors of the elementary reflectors. WORK WORK is REAL array, dimension (3*N) INFO INFO is INTEGER = 0: successful exit < 0: if INFO = -i, the i-th argument had an illegal value Author: Univ. of Tennessee Univ. of California Berkeley Univ. of Colorado Denver NAG Ltd. Date: November 2011 Further Details: The matrix Q is represented as a product of elementary reflectors Q = H(1) H(2) . . . H(n) Each H(i) has the form H = I - tau * v * v**T where tau is a real scalar, and v is a real vector with v(1:i-1) = 0 and v(i) = 1; v(i+1:m) is stored on exit in A(i+1:m,i). The matrix P is represented in jpvt as follows: If jpvt(j) = i then the jth column of P is the ith canonical unit vector. Partial column norm updating strategy modified by Z. Drmac and Z. Bujanovic, Dept. of Mathematics, University of Zagreb, Croatia. -- April 2011 -- For more details see LAPACK Working Note 176. Definition at line 143 of file sgeqpf.f. Author Generated automatically by Doxygen for LAPACK from the source code. Version 3.4.2 Tue Sep 25 2012 sgeqpf.f(3)
All times are GMT -4. The time now is 12:48 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy