09-12-2018
Quote:
Originally Posted by
novilatte
I am writing a data request for transfer oe seismological data from a webservice.
------ Post updated at 11:53 AM ------
I shoud be ok with specifying invalid dates (e.g., for february) as then the request will just send me an error code, and not get that data.
This is all interesting, but it still doesn't tell us what you are trying to do nor what output you are trying to produce. Robin asked you several questions in post #2 in this thread that you have not answered.
In what way does producing a list of months 2 through 13 on days 2 through 31 help you define two strings referencing a start time and an end time for an unspecified event.
Knowing that you don't mind creating invalid dates and don't mind losing some of your seismological data is interesting, but it still doesn't tell us what output you're trying to produce nor what that output represents in the real world.
We want to help you reach your goal, but if you don't explain what you're trying to do we are left guessing at what you might be trying to do and are highly unlikely to make a guess that will be of any use to you. Please help us help you!
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Dear Expert,
Is there a command to do that in Unix?
In such a way that we don't need to actually "write" or
modified the content.
-- monkfan (4 Replies)
Discussion started by: monkfan
4 Replies
2. Shell Programming and Scripting
I am working on a script that checks two arguments at the command line. The first argument is a search pattern, the second can be a file or a directory, if it is a file a second script is called that checks it for the search pattern. If the second argument is a directory, it checks for the search... (5 Replies)
Discussion started by: Breakology
5 Replies
3. Shell Programming and Scripting
I need some help recovering from a "slight" screwup. We just moved 3 TB of data from one RAID Array to another. Low lever archive files. This was done with a regular cp (for some reason) and now we have lost all the timestamps on the files, and we urgently need to get the timestamps back on these... (7 Replies)
Discussion started by: chj
7 Replies
4. Shell Programming and Scripting
How can I change the cron entries only for ABC and XYZ from dosomething_1.0.sh to nowchanged_2.0 using a bash script ?
Any help will be appreciated.
#
# ABC
00,05,10,15,20,25,30,35,40,45,50,55 * * * * /mydir/dosomething_1.0.sh 1>/dev/null 2>&1
#
#
##
# DEF... (4 Replies)
Discussion started by: jville
4 Replies
5. Shell Programming and Scripting
Hi,
I run a script which outputs various records, anyway one of the columns contains the date in the format DDMMYYYY, I would like to make this DDMMYY.
Is there an easy way to do this, (11 Replies)
Discussion started by: mcclunyboy
11 Replies
6. UNIX for Dummies Questions & Answers
Hi Experts,
We get "Day" of a month in a variable, so how to make date of out it?
To make more sense
if my variable $DAY contains "12" and month and year will be current date (as of today)
so I want to see as output as 2013-09-12.
How can I achive this bash script??
Any help is... (4 Replies)
Discussion started by: parpaa
4 Replies
7. Shell Programming and Scripting
Hello Guys
I have a script working fine on csh, but I would like to change it to bash, how I should change this command to be able to work as bash script. :wall:
if ( $fsw > "0" ) then
foreach swath ( `awk 'BEGIN {for (i='$fsw';i<='$lsw';i++) printf ("%s\n", i) }'` )
## work to be done... (2 Replies)
Discussion started by: jiam912
2 Replies
8. UNIX for Beginners Questions & Answers
#!/bin/bash
X=$(</home/cogiz/computerhand.txt) # (3S 8C 2H 6D QC 8S 4H 5H)
Y=$(</home/cogiz/topcardinplay.txt) # KS
A=( "${Y::1}" )
B=( "${Y:1}" )
for e in ${X}; do
if ]; then # searching for valid cards K,S or 8
... (0 Replies)
Discussion started by: cogiz
0 Replies
9. UNIX for Beginners Questions & Answers
I'm trying to change date format using this script from day/month/year to month/day/year
#!/bin/bash
while read line; do
echo "$line"
date=$(echo "$line" | cut -d/ -f1 )
month=$(echo "$line" | cut -d/ -f2 )
echo $month"/"$date"/2017"
done < ~/Downloads/Dates.csv
But I get output as... (5 Replies)
Discussion started by: sharat
5 Replies
10. UNIX for Beginners Questions & Answers
Hi All,
I have a CSV file which is as below. Basically I need to take the year column in it and find if the year is >= 20152 . If that is then I should subtract all values by 6. In the below example in description I am having number mentioned as YYWW so I need to subtract those by -5. Whereever... (8 Replies)
Discussion started by: arunkumar_mca
8 Replies