10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
hi all,
need a script or command to get the previous date for the given input date...
like in my script i will pass date as input parameter like 2014-12-01 and i want the output as previous date.. ie.. 2014-11-30 (2 Replies)
Discussion started by: hemanthsaikumar
2 Replies
2. Shell Programming and Scripting
hi all
i'm new in shell scripting and now i'm working on project and i wanna make a function take input from user and test it's datatype then if correct write it to file
i wounder what is the best way to do this ?
can i use awk ?
edit by bakunin: Please give your threads a meaningful... (5 Replies)
Discussion started by: mohamed91
5 Replies
3. Shell Programming and Scripting
Hi,
I need to get input arguments, as well as validate them. This is how I'm reading them:
#!/bin/bash
args="$@" # save arguments to variable
## Read input arguments, if so
while ; do
case $1 in
-v | --verbose ) verbose=true;;
-z | --gzip ) compression="gz";;
... (3 Replies)
Discussion started by: AlbertGM
3 Replies
4. Shell Programming and Scripting
Hi,
I have been trying to get the yesterdays date for the Input date I pass.
I know how to do for the current timestamp but how to do for the input date.
Is there any way I can convert to epoch time and do manipulations and back to human readable date?
Please help
Thanks
... (1 Reply)
Discussion started by: abhi1988sri
1 Replies
5. Shell Programming and Scripting
Hello,
I have a file like this:
2012112920121130
12345620121130msABowwiqiq
34477420121129amABamauee
e7748420121130ehABeheheei
in case the content of the file has the date of yesterday within the lines containing pattern AB this should be replaced by the current date. But if I use... (3 Replies)
Discussion started by: Lilu_CK
3 Replies
6. UNIX for Dummies Questions & Answers
This may be a dumb question, but googling is not giving me an answer. I'm trying to figure out how to refer to an input file in my code.
Lets say i run a script in bash:
"sh shellscript.sh inputfile"
(Inputfile will be variable...whatever file i run the script on)
I wanted to make... (5 Replies)
Discussion started by: legato22
5 Replies
7. UNIX for Advanced & Expert Users
Hello,
I'm having problem with an iptables rule. It seems that on one of two systems on the nat table, the INPUT chain doesn't exist for some strange reason.
I get the error below:
# iptables -t nat -A INPUT -j ACCEPT
iptables: No chain/target/match by that name.
Here is my kernel on... (0 Replies)
Discussion started by: Narnie
0 Replies
8. Shell Programming and Scripting
Ok, I have a script with a commandline option that allows the user to add a custom function to the script file. I have tried everything in my limited knowledge of sed to get this to work and keep coming up short. I need sed to search for a line starting with a pattern, I've got that part so far,... (0 Replies)
Discussion started by: DC Slick
0 Replies
9. UNIX for Dummies Questions & Answers
Hi,
I want to check a particular word is in standard error output or not. Can I acheive it in single command?
For example,
Delete file_name 2>error.log
cat error.log
Output:
XXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXX
Successfully deleted
XXXXXXXXXXXXXXXXX
where delete is... (2 Replies)
Discussion started by: poova
2 Replies
10. Shell Programming and Scripting
Hi Experts,
I have files name
report_20090416
report_20090417
report_20090418
report_20090420
report_20090421
I have 2 input from user
From Date: 20090417
To Date: 20090420
and I need to grep only those line in between. Output should be
report_20090417
report_20090418... (3 Replies)
Discussion started by: tanit
3 Replies