1/ At the beginning of the script the shebang should be included,
2/ you're using ' instead of ` at line 6
3/ /tmp should be used consistently, not /temp at line 6
Hi !
I have the following situation -
##First variable
variableA=JOB_A
##bunch of other variable
JOB_A_RESTART=cleanupJobA
JOB_B_RESTART=cleanupJobB
JOB_C_RESTART=cleanupJobC
now i need a script which would -
1. take the first variable
2. create a new variable name... (2 Replies)
Hi all,
i am quite fimiliar with shell scripting but i wouldn't regard myself as a semi professional at it.
I am trying to create an array variable to read in 4 lines from a file using head and tail command in a pipeline and store each line into each array. I have done the scripting in unix... (2 Replies)
Hello all...
I'd like to create a variable from an array element from two arrays. In my search for answers I found this code for bash that joins two arrays and then started to work with it. I had got to work once and then foolishly without saving the code, I started to edit it for ksh and... (4 Replies)
I would like to create a variable within my bash script using awk. I'm reading in a line from an external file, then outputting to a new file in a specific format. But, it doesnt quite work as I have expected and could use some help.
(A pertinent excerpt of ) the bash code is:
count=1
... (4 Replies)
Can anyone help how to create a variable in remote server using shell script. i am connecting to remote server through ssh and creating a variable and assigning the value, but nothing is displayed when i run the script
Here is my script
ssh hostname <<EOF
a=10
echo $a
EOF (1 Reply)
i have a file 'detail' which contains
cat detail
111111
222222
333333
444444
but detail may be 4 line file.6 line file or 8 line file like
cat detail
111111
222222
333333
444444
555555
666666
777777
888888
so i want a declare a loop which assign the value of first line in one... (11 Replies)
Goal: I want run a Bash script that runs some conditional if statements on a specific file path that a user defines.
Question: How do I build the prompt so the script asks the user to define the file path and then use that input as a variable?
I'm guessing I will use a read builtin but I'm... (3 Replies)
I am new to shell scripting and I ran into a couple lines of code which I don't completely understand:
PATH=/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/entity/bin
data_dir=/usr/local/entity/projectI believe data_dir to be a more conventional link to a directory. However, I am not sure what PATH... (12 Replies)
Discussion started by: Circuits
12 Replies
LEARN ABOUT NETBSD
zfgrep
ZGREP(1) BSD General Commands Manual ZGREP(1)NAME
zgrep, zegrep, zfgrep -- print lines matching a pattern in gzip-compressed files
SYNOPSIS
zgrep [grep-flags] [--] pattern [files ...]
zegrep [grep-flags] [--] pattern [file ...]
zfgrep [grep-flags] [--] pattern [file ...]
DESCRIPTION
zgrep runs grep(1) on files or stdin, if no files argument is given, after decompressing them with zcat(1).
The grep-flags and pattern arguments are passed on to grep(1). If an -e flag is found in the grep-flags, zgrep will not look for a pattern
argument.
zegrep calls egrep(1), while zfgrep calls fgrep(1).
EXIT STATUS
In case of missing arguments or missing pattern, 1 will be returned, otherwise 0.
SEE ALSO egrep(1), fgrep(1), grep(1), gzip(1), zcat(1)AUTHORS
Thomas Klausner <wiz@NetBSD.org>
BSD December 28, 2003 BSD