Sponsored Content
Top Forums Shell Programming and Scripting Check if a string is a valid timestamp in UNIX. Post 302902575 by rbatte1 on Wednesday 21st of May 2014 07:38:57 AM
Old 05-21-2014
A few questions:-
  • What have you tried so far?
  • What output/errors are you getting?
  • What OS and version are you using?
  • What are you writing your code in?
Most importantly, What have you tried so far?


Give a man some food and he will eat for a day. Give him seeds and teach him to farm and he will feed his family.



Robin
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

How to check for a valid numeric input

Hi Folks, I'm using bash script. I would like to check whether input is a number or not.(Only positive numbers).. if space or non numeric is entered, it should say "invalid input". pls help.. thanks in adv. Br/// Vijay. (1 Reply)
Discussion started by: Vijayakumarpc
1 Replies

2. Shell Programming and Scripting

to check whether a directory or filename path is valid or not

the script on excution should take a directory path from useran a numric input and it should check indicate whether its write or not? if the cmmd sh<script-name>,dir/path.<500>" is greater than 500 in size should be copied to dir ,temp in pwd and display the mesage'files of 2000 bytes hav been... (4 Replies)
Discussion started by: arukr
4 Replies

3. Shell Programming and Scripting

To convert a date(in string format) to unix timestamp

Hi All, I have a string like below. "Mar 31 2009" . I want to convert this to unix time . Also please let me know how to find the unix time for the above string minus one day. For Eg. if i have string "Mar 31 2009" i want to find the unix time stamp of "Mar 30 2009". Thanks in advance,... (11 Replies)
Discussion started by: girish.raos
11 Replies

4. Shell Programming and Scripting

Whether a string is a valid unix command

How to find a string which is entered in command promt is a valid unix command or not?. Thanks in advance ~Saravana (2 Replies)
Discussion started by: tsaravanan
2 Replies

5. Homework & Coursework Questions

Bash shell - Check if value is valid directory.

1. The problem statement, all variables and given/known data: The script usage will be as follows: library.third source_directory - Your script will display an appropriate error message and exit with status 3 if no parameters are given - Your script will display an appropriate error... (2 Replies)
Discussion started by: netmaster
2 Replies

6. Shell Programming and Scripting

how to check for valid password

I need to check if an account has a valid password. Would something like this work? read ACCNAME if grep -q "^$ACCNAME:\$6:" /etc/shadow; thenI noticed every entry in my shadow file that has a password starts with $6 ... it works for my current setup, but would it always work? I can't test... (4 Replies)
Discussion started by: ADay2Long
4 Replies

7. UNIX for Dummies Questions & Answers

How to check if file contains valid strings?

Hi All, I am a newbie...I would like to have a function which ll check if a file contains valid strings before "=" operator. Just to give you my requirement: assume my file has content: hello= gsdgsd sfdsg sgdsg sgdgdg world= gggg hhhh iiiii xxxx= pppp ppppp pppp my... (5 Replies)
Discussion started by: rtagarra
5 Replies

8. Shell Programming and Scripting

To check timestamp in logfile and display lines upto 3 hours before current timestamp

Hi Friends, I have the following logfile. Currently time in india is 07/31/2014 12:33:34 and i have the following content in logfile. I want to display only those entries which contain string 'Exception' within last 3 hours. In this case, it would be the last line only I can get the... (12 Replies)
Discussion started by: srkmish
12 Replies

9. Shell Programming and Scripting

Check if time format is valid

How can I validate if time (HH:MM:SS) argument is valid? I got this from web but I can't modify it to exit the script if the time argument is invalid. echo $1 | awk -F ':' '{ print ($1 <= 23 && $2 <= 59 && $3 <= 59) ? "good" : "bad" }' ex: ./script.ksh 12:34:21 = okay ./script.ksh... (10 Replies)
Discussion started by: erin00
10 Replies

10. Shell Programming and Scripting

Check for valid hostnames

Hello, I am trying to develop a script to check for valid hostnames. Below are the prerequisites for a valid hostname which I got from wiki : Hostnames are composed of series of labels concatenated with dots, as are all domain names. For example, "en.wikipedia.org" is a hostname. Each label... (8 Replies)
Discussion started by: rahul2662
8 Replies
gmpc-remote(1)					    Gnome Music Player Client - Remote control					    gmpc-remote(1)

NAME
gmpc-remote - a remote control for GMPC. SYNOPSIS
gmpc-remote [OPTION] DESCRIPTION
If GMPC is compiled with IPC support gmpc-remote can send commands to the running instance of GMPC. OPTIONS
--version Display version. --help Show all available application options. --quit Quit the running gmpc. --play Give GMPC the play command. --pause Give GMPC the pause command. --next Give GMPC the next command. --prev Give GMPC the previous command. --stop Give GMPC the stop command. --stream Gives mpd a stream to parse and play. --easycommand Send an 'easy command' query to GMPC. --toggle-view Give GMPC the command to show/hide itself. --hide-view Give GMPC the command to hide itself. --show-view Give GMPC the command to show itself. SEE ALSO
Website: http://gmpclient.org/ MPD Website: http://www.musicpd.org Bug tracker: http://www.musicpd.org/mantis/ gmpc-remote-stream(1) gmpc(1) mpd(1) AUTHOR
gmpc-remote was written by Qball Cow <qball@gmpclient.org> February 21, 2010 gmpc-remote(1)
All times are GMT -4. The time now is 10:59 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy