10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I have a script which does gunzip, zip and untar.
Input to the script is file name and file directory (where file is located)
I am reading the input parameters as follows:
FILENAME=$1
FILEDIR=$2
I have created 3 functions that are as follows:
1) gunzip file
2) unzip file... (2 Replies)
Discussion started by: pinnacle
2 Replies
2. UNIX for Dummies Questions & Answers
The problem I am having now is calling and reading a command and The Main script reads the data file and passes the input to the two calculation scripts, and than output to a file.
1.
The Main Script
-----------------
input=inputfilepj3
output=outfilepj3
echo "*** Converting... (2 Replies)
Discussion started by: TheUnitedOSI
2 Replies
3. Shell Programming and Scripting
I have a function which does awk proceessing
sub mergeDescription {
system (q@awk -F'~' '
NR == FNR {
A = $1
B = $2
C = $0
next
}
{
n = split ( C, V, "~" )
if... (3 Replies)
Discussion started by: crypto87
3 Replies
4. Shell Programming and Scripting
Hi I need to call a function written in a cpp file with arguments inside the shell script..Can anyone help me how to do this:( (1 Reply)
Discussion started by: rkrish
1 Replies
5. Shell Programming and Scripting
This is my function which is creating three variables based on counter & writing these variable to database by calling another function writeRecord
but only one record is getting wrote in DB.... Please advise ASAP...:confused:
function InsertFtg
{
FTGSTR=""
echo "Saurabh is GREAT $#"
let... (2 Replies)
Discussion started by: omkar.sonawane
2 Replies
6. Shell Programming and Scripting
Hi All,
I have an awk statement and a function defined in a script.
I am trying to call the function from inside awk statement, i.e.
awk ' myFunk () ;' filename
But when I define myFunk() before awk, then I receive this error:
s2.sh: line 48: syntax error: unexpected end of file
and... (5 Replies)
Discussion started by: morningSunshine
5 Replies
7. Shell Programming and Scripting
I have two scripts. script1.sh looks
--------------------------------
#!/bin/bash
display()
{
echo "Welcome to Unix"
}
display
-----------------------------
Script2.sh
#!/bin/bash
sh script1.sh //simply calling script1.sh
------------------------------ (1 Reply)
Discussion started by: mvictorvijayan
1 Replies
8. Shell Programming and Scripting
I am new to shell scripting and I have to to the following
I have a flat file with storename(lenth 20) , emailaddress(lenth 40), location(15). There is NO delimiters in that file.
Like the following str00001.txt
StoreName emailaddress location... (3 Replies)
Discussion started by: willywilly
3 Replies
9. UNIX for Dummies Questions & Answers
This may sounds dumb, but can I call on a function from a file? For example, I have a function file full of functions like below (no shell designation):
func { echo "blah blah blah 1" }
func2 { echo "blah blah blah 2" }
func3 { echo "blah blah blah 3" }
Am I able to call on any one... (3 Replies)
Discussion started by: douknownam
3 Replies
10. Shell Programming and Scripting
Hi,
I am pretty new to unix.
Lets say i have a program(run_program) that will call another file function(functiona, in same directory):
hence, inside that run_program. i will just call "functiona xx xx" to refer and use that function. this run ok until i run this program from another folder.... (3 Replies)
Discussion started by: maldini
3 Replies