Skip to main content

All Questions

Tagged with
0 votes
0 answers
56 views

Can we use SFTP GET command to retrieve the latest file from the directory? [duplicate]

I looked for a solution to retrieve the latest file from the directory and found in google in this very website. latest_remote_file = $(ssh username@server_name 'ls -tr /path | tail -n 1') scp -r ...
Brindha Sharadha's user avatar
1 vote
1 answer
36 views

ls -rt | tail -n 1 does not work inside theJCL - piping symbol causing issue

I am facing a very strange problem, this command ls -rt | tail -n 1 works in linux server in the putty, but the same command when I give inside the JCL, for some unknown reason doesn't work. //SYSUT1 ...
Brindha Sharadha's user avatar
0 votes
2 answers
27 views

Printf command adding extra space in the line

I am trying to create hdr record in unix script. I am using printf function to populate. printf statement added 2 spaces in the line. I am using below code for that REC_TYP="1" SYS_ID=&...
Pandia Shanmugam's user avatar
0 votes
1 answer
95 views

Working with shell scripts on hp-ux and need to convert time to epoch using date command. How to solve bad format character -s error?

To Work on few shell scripts and I need to get the time in terms of epoch in hp-ux I tried using date +%s but i got bad format character - s error i am allowed to use -u and -a options with date ...
Udit Maheshwari's user avatar
0 votes
1 answer
770 views

Kotlin: how to get the start time of a day and end time of a day?

My input is unix seconds from epoch, which represents the date, that I need to work with, I need to convert the date to start time of a day and end time of a day of the same date, what are possible ...
agingcabbage32's user avatar
0 votes
2 answers
225 views

timestamp variable in unix

I am getting below data in in bash script variable exp_dt: exho $exp_dt Jun 5 08:25:42 2023 GMT need help to convert it into format like "05-Jun-2023" and days remaining from current date ...
joy 's user avatar
  • 216
0 votes
0 answers
53 views

How to fetch the date of the file from the folder in UNIX Shell Script?

I am beginner to Shell Script. Just want to know how to fetch date of the file from the properties in the UNIX Shell Script? When I put 'ls -lrt' , could fetch the date where as for last six months we ...
karthickraja's user avatar
0 votes
1 answer
224 views

Time taken by loop/commands in usecs in shell script

I need to measure the time taken by command(s) in usecs inside my shell script start_time ; Command1; command2; end_time; time_taken = end_time -start_Time; I was looking at the Time commands, but ...
user3555115's user avatar
-1 votes
1 answer
54 views

How to write a shell script to compare values numerically?

I want the file fig.txt read in a shell script like here the number is 8 so if the number/value is less and equal to the value 5000 it will alert via mail that lock file overflow and if not it will ...
Raj's user avatar
  • 1
0 votes
0 answers
66 views

Retrieving the last modified file in a directory over FTP using a shell script with curl

I am getting pulling the data from server and placing that in my local. curl --verbose --ftp-ssl--user 'username:password' ftp://abc.com:001//this/is/stackoverflow/ > /home/dir1/dir2/dir3 In ideal ...
Kumar A's user avatar
  • 11
0 votes
2 answers
73 views

Changing a Unix Timestamp to a Date in google sheet each time data is added

I am trying to convert a unix time stamp to a date in Google sheet. The problem I am having is I need the unix stamp to change to a date each time using a formula every time the data gets added to the ...
Blaze101's user avatar
0 votes
1 answer
94 views

get file's last modified date stamp in Unix

I need to find the file last modified date stamp in Unix. Please help me me in finding the solution.
Harish's user avatar
  • 15
0 votes
0 answers
11 views

how to add 3 days in unix time to unix timestamp [duplicate]

<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script> <script> $(document).ready(function () { var bid = "https://api.etherscan.io/...
jackson hill's user avatar
0 votes
1 answer
828 views

How to calculate timestamp from UNIX UTC for a date that is not my timezone

I am developing a weather app and I'm trying to retrieve the sunrise and sunset times. These values come in UNIX UTC format and I'm able to transform them into date and time, but the time always seem ...
winter's user avatar
  • 227
0 votes
1 answer
89 views

How to remove double quotes(") and new lines in between ," and ", in a unix file

I am getting a comma delimited file with double quotes to string and date fields. we are getting " and new line feeds in string columns like below. "1234","asdf","with&...
vishnu 's user avatar

15 30 50 per page
1
2 3 4 5
14