hey
i want to extract an argument from double qoutes, eg: when the user enters:
prompt "mile"
i need to extract everything within the double quotes, in my case, mile, and save it to a string. feedback/code would be appreciated
thanks
mile1982 (1 Reply)
I need help in extracting first file only from an ls command
and store it in a local variable
I thought using awk we could build something - not very
familiar how to do it
Something like
ls -t $search_string and store the resultant
first file alone into a local variable ( as my result... (4 Replies)
I have been slowly working towards getting a shell window in Cygwin (and/or Gnome and/or KDE) to start up and display the last time it was opened (or sourced) similarly to how the OS X Terminal does so. As close as I've been able to get so far is the 'who' command, but I can't seem to puzzle out... (2 Replies)
Is there a utility built into Solaris that will allow me to see console messages from a tty?
I've done a search and see that this is possible through software like ILOM, but I'm looking for a method to do this with built in utilities.
For example, on AIX, I can use swcons `tty` (6 Replies)
We have script like this in the .bash_profile..
#-# determine if session is interactive or in background
if ]; then
while true; do
read -p "Do you wish to load profile yes or no?" yn
case $yn in
* ) source /opt/oracle/.profile; break;;
* ) break;;
*... (2 Replies)
Need expert's opinion urgently.
I have a file which contains messages.
A message is separated by $ in this file.
In each message we need to get string aftr :20: and send it to an output file. If :20: is not prsent in a message then we need to search for :20C: and send the corresponding string... (5 Replies)
So I want to put a line at the end of my script which greps for keywords from syslog.log that outputs the following after it is done:
"This file was last modified on (thisdate)"
I know I can use the following to get the date:
rtidsvb(izivanov):/home/izivanov> ll /var/adm/syslog/syslog.log ... (4 Replies)
Hi,
I am having an file 20110909.tar.gz (path-home/user01/archive/20110909.tar.gz ), contains some log files some csv files
I want to extract that files . if i run "ls" command then their should be display all the log files and csv files on the same path.
please help me to know the... (4 Replies)
In bash, you can do something like this:
#!/bin/bash
echo -n "What is your name? " > /dev/tty
read thename < /dev/tty
How can I do the same in python?
I have a python script that has the following content:
#!/usr/bin/python2.7
import getpass
import sys
import telnetlib
import... (2 Replies)
Discussion started by: SkySmart
2 Replies
LEARN ABOUT MINIX
zgrep
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)