10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi folks,
I have a scenario to convert the update statements into insert statements using shell script (awk, sed...) or in database using regex.
I have a bunch of update statements with all columns in a file which I need to convert into insert statements.
UPDATE TABLE_A SET COL1=1 WHERE... (0 Replies)
Discussion started by: dev123
0 Replies
2. Shell Programming and Scripting
Hi all
Y=`date +'%Y'`
M=`date +'%m'`
D=`date +'%d'`
if && ;then
yesterday=$Y$M`expr $D + 30`
echo $yesterday
else
if && ; then
yesterday=$Y$M`expr $D + 29`
echo $yesterday
else
if ; then
yesterday=$Y$M`expr $D + 27`
echo $yesterday
else
yesterday=$Y$M`expr $D - 1`
echo... (8 Replies)
Discussion started by: ultimatix
8 Replies
3. Shell Programming and Scripting
I have a script which archives log file events which are 90-days old. Script works fine but I wanted some input on one aspect of this script. My nawk statement, bolded below, that removes events 90-days prior from today, I need it to find anything 90-days or older. The log file date pattern looks... (0 Replies)
Discussion started by: numele
0 Replies
4. Shell Programming and Scripting
Hi,
the date value retrieved by a parameter from the table is of the format dd/mm/yyyy. please let me know how to convert this to YYYYMMDD using sed
thanks (4 Replies)
Discussion started by: swasid
4 Replies
5. Shell Programming and Scripting
I am writing a script that ssh's out to our various servers and extracts diskspace info to generate into a report. With the mix of servers linux/solairs 8-10/AIX the easiest way is to use df -k (though I much rather prefer df -h).
I have pasted the relevant code:
dfdata=`ssh -q -o... (1 Reply)
Discussion started by: rkruck
1 Replies
6. OS X (Apple)
Hi -
I'm using GeekTool to customize my desktop in OS X 10.5.8
I'm a complete novice as far as UNIX commands, just know enough to be dangerous.
I have a command entered as a Shell to display my events from iCal:
This makes my events show something like this:
While this is... (1 Reply)
Discussion started by: patricksprague
1 Replies
7. Shell Programming and Scripting
Hi
i need to have the date in the format like dd-mon-yyyy
my script goes like this
#!/usr/bin/bash
for f in /space/can /home/lbs/current/externalcdrbackup/L_CDR_Configuration/1/200903122* ; do
awk '{sum++;}END{for(i in sum) {print d,h,m,i, sum}}' "d=$(date +'%m-%d-%Y')" "h=$(date +'%H')"... (8 Replies)
Discussion started by: aemunathan
8 Replies
8. UNIX for Dummies Questions & Answers
Running bash how do I input the date in the command line like 3/20/90 and get an output formmated like March, 20 1990. (8 Replies)
Discussion started by: knc9233
8 Replies
9. Shell Programming and Scripting
Date format MM/DD/YYYY
required is YYYYMMDD, I tried using sed but could not get it any help please. (4 Replies)
Discussion started by: mgirinath
4 Replies
10. Shell Programming and Scripting
i need date in the following format December 14, 2005.
With date +"%b %d, %Y" command i am getting the following output :- Dec 14, 2005.
can anyone pls tell me how to get the full month name (2 Replies)
Discussion started by: radhika03
2 Replies