How to get IST in Unix if my current timezone is UTC. Also I need to get the time format to be dd/mm/yyyy hr:min:sec? [closed] - date

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed last year.
Improve this question
I have just started learning about the date command in Unix.
I have typed the below code to get the IST. But I don't know how to convert it to a specific format.
TZ = IST-5:30 date
This gives the result as Thu Feb 10:31:51 IST 2022.
But I want the output to be 03/02/2022 10:31:51 IST.
Is there any way to get the output?

With date (GNU coreutils) 8.32 you can use the +FORMAT argument:
TZ=IST-5:30 date +'%d/%m/%y %T %Z'
03/02/22 10:46:50 IST
%x would be a better choice instead of %d/%m/%y if your locale allows for it.

Related

sort images by powershell script [closed]

Closed. This question is not about programming or software development. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 2 days ago.
Improve this question
i'm inserting products in my site, i have many boxes and i made a folder for every box, and inside the box folder are product images, every product have 2 image, i want to rename them like this with powershell script
box1 -> {1-1.jpg , 1-2.jpg , 2-1.jpg , 2-2.jpg .....}
box2 -> {1-1.jpg , 1-2.jpg , 2-1.jpg , 2-2.jpg .....}
.
.
.
box example
and they must sort with date taken property first because i take them after each other
i need a powershell script to help me rename all of this images with date taken order and double names like 1-1, 1-2, 2-1, 2-2 and so on. there's a lot boxes i can't do it manually !
i found some powershell scripts but they all organized images in folders or just renamed image to date taken string and things like this

How to style pills in a Word document? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 2 years ago.
Improve this question
In an MS Word document, how can I style text into pills, for example like the Bootstrap pills or in the image below?
Doesn't have to be exactly like this, just something similar.
I can highlight a word but it is very limited.
Apologies if this is off topic. I could find a better location.
Additionally, I would rather keep the elements within the flow of the page, so that it can scraped correctly by CV scanners.
I.E. I don't want to insert a load of floating textboxes.
Use a combination of range.border and font properties
Option Explicit
Public Sub MakePill(ByVal ipRange As Word.Range)
' Ensure a space before and after the text in the range
myRange.InsertBefore Text:=" "
ipRange.InsertAfter Text:=" "
myRange.Borders.Enable = True
myRange.Font.Shading.BackgroundPatternColor = wdColorAqua
End Sub

Double exclamation in fish shell [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 1 year ago.
Improve this question
In zsh, I can execute them.
$ sleep 1
$ echo !$ # !$ equals 1
$ echo !! # !! equals sleep 1
But I can't execute them in fish shell.
Could tell me why and where the zsh documentation is?
This is history expansion, which has a lot more to it then those simple examples.
Fish supports none of it (and probably never will). The usual workaround is to use keybindings. By default, alt-up and alt-down should go through the history token-wise, so you can press alt-up once to get what is effectively !$.
If you wish to prepend something to a command from history, recall that command, go to the beginning (e.g. with ctrl-a) and insert what you want.
Other possibilities are functions to bind e.g. !! to something to insert the previous command or to make a command called !!.
This is still discussed in fish issue #288, though concensus seems to be against adding history expansion.

How do I extract the first x lines from a large CSV file? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Closed 8 years ago.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
This question appears to be off-topic because it lacks sufficient information to diagnose the problem. Describe your problem in more detail or include a minimal example in the question itself.
Improve this question
How do I extract the first 100,000 lines from a large CSV file (1GB+) using only Powershell on a Windows machine?
Not sure why the below answer was marked as not helpful when it answers the question.
-TotalCount<Int64>
Gets the specified number of lines from the beginning of a file or other item. The default is -1 (all lines).
You can use the "TotalCount" parameter name or its aliases, "First" or "Head".
The performance of the command can be improved by
Get-Content -TotalCount 100000 -ReadCount 0 filename.csv
Get-Content -TotalCount 100000 filename.csv

Correct way of deleting items in a numbered list? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 8 years ago.
Improve this question
I have a numbered list in org-mode like
1. A
2. B
3. C
4. D
Now when I kill the second line the list incorrectly gets ordered as,
1. A
3. C
4. D
instead of
1. A
2. C
3. D
I know I can always re-order the list before deleting something, but for long lists this becomes a hassle.
Is there a smarter way to avoid this?
You can kill such lines with no fear in mind. Just use C-c C-c afterwards, or S-right and S-left to go back to the previous list style (with up-to-date numbers).