Experts,
I tried to make my cshell script interactive by asking the user for password and trying to read the input using the "read" command. I have been unsuccessful so far. Do you have any idea ?
Thanks
Jim (2 Replies)
Linux, C++, make, macro
In source code, we used some #ifdef macros. How can I enable #ifdef macro in the command line of "make" (NOTE: I do NOT want to change source code or makefile to define that macro from time to time).
e.g. test.cpp:
...
#ifdef TEST1
// code segment for test1
...... (3 Replies)
Hi,
I am new to shell scripting.I have written a very simple shell scipt that asks for the username and password on executing. i.e
echo "Enter username :"
read usrname;
echol "Enter password :";
read passwd;
echo usrname;
echo passwd;
but now I want to make it automatic , such... (2 Replies)
Q. Write a script that behaves both in interactive and non interactive mode. When no arguments are supplied it picks up each C program from the directory and prints first 10 lines.
It then prompts for deletion of the file.
If user supplies arguments with the script , then it works on those files... (8 Replies)
I have no idea what the following means. The teacher is too advanced for me to understand fully. We literally went from running a few commands over the last few months to starting shell scripting. I am not a programmer, I am more hardware oriented. I wish I knew what this question was asking... (3 Replies)
Hello,
Script command helps to save command output to file. (Redicection doesn't work in this case).
Besides interactive shell 'recording', Linux script command has "-c" option which allows to record output of some non-interactive command.
The problem is that AIX script command variant... (6 Replies)
Task A: Make a one-line Unix command - using pipe(s) - to display the number of files in your home directory including the hidden files that begin with '.'
Task B:Make a one-line Unix command - using pipe(s) - to display the number of unique zip codes in famous.dat (hint: use -u on sort)
Task... (1 Reply)
Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted!
1. The problem statement, all variables and given/known data:
1) The script is executed in the Korn shell.
2) Name the shell script file is asg6s.
3) The asg6s file is... (7 Replies)
i use this command to make pkgadd non-interactive.
Command1:
echo | sudo /usr/sbin/pkgadd -n -a /u/base/admin -r silent.txt -d /tmp/dbs.pkgThis works fine if i run it as root user but when i run it with non-root user it prompts me for the password and then executes successfully thus making it... (9 Replies)
Discussion started by: mohtashims
9 Replies
LEARN ABOUT LINUX
zegrep
ZGREP(1) General Commands Manual ZGREP(1)NAME
zgrep - search possibly compressed files for a regular expression
SYNOPSIS
zgrep [ grep_options ] [ -e ] pattern filename...
DESCRIPTION
Zgrep invokes grep on compressed or gzipped files. These grep options will cause zgrep to terminate with an error code:
(-[drRzZ]|--di*|--exc*|--inc*|--rec*|--nu*). All other options specified are passed directly to grep. If no file is specified, then the
standard input is decompressed if necessary and fed to grep. Otherwise the given files are uncompressed if necessary and fed to grep.
If the GREP environment variable is set, zgrep uses it as the grep program to be invoked.
EXIT CODE
2 - An option that is not supported was specified.
AUTHOR
Charles Levert (charles@comm.polymtl.ca)
SEE ALSO grep(1), gzexe(1), gzip(1), zdiff(1), zforce(1), zmore(1), znew(1)ZGREP(1)