10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
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
2. Shell Programming and Scripting
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)
Discussion started by: aish11
4 Replies
3. Shell Programming and Scripting
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)
Discussion started by: zixzix01
4 Replies
4. Shell Programming and Scripting
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)
Discussion started by: Opamps123
5 Replies
5. Shell Programming and Scripting
how to use expr command to retrieve all the words before the equal sign "=" with shell script (3 Replies)
Discussion started by: 76455
3 Replies
6. Shell Programming and Scripting
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)
Discussion started by: talashil
2 Replies
7. Solaris
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)
Discussion started by: makodarear
6 Replies
8. UNIX for Dummies Questions & Answers
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)
Discussion started by: SilversleevesX
2 Replies
9. Shell Programming and Scripting
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)
Discussion started by: prekida
4 Replies
10. Programming
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)
Discussion started by: mile1982
1 Replies