dharmik on Nostr: TIL how to use $(command) to capture the output of one command and use it in another! ...
TIL how to use $(command) to capture the output of one command and use it in another!
you can get the date as folder name (in format month abbreviate-date-year) with
mkdir "$(date +"%b%d%Y")"
- $(...) is used to execute the date command and substitute its output.
Published at
2024-11-27 05:53:56Event JSON
{
"id": "ab66b1edc052544a784058993b1a07add759463dec3a86e5ddba083617ef74b5",
"pubkey": "24d53b5b7fdb0dad7d0082b11763b21324af150e6daa8d0c0bb9b150a1e54568",
"created_at": 1732686836,
"kind": 1,
"tags": [
[
"proxy",
"https://linuxusers.in/dharmik/p/1732686836.883567",
"activitypub"
]
],
"content": "TIL how to use $(command) to capture the output of one command and use it in another!\n\nyou can get the date as folder name (in format month abbreviate-date-year) with\n\nmkdir \"$(date +\"%b%d%Y\")\"\n\n- $(...) is used to execute the date command and substitute its output.\n",
"sig": "7b214086b978f4abaa560f9c6f0db3005ac667e01b1bf1b39cb12087e17339e364d4e8ce8403beeb65c63f7fe20c9a0a1e54a6bd3bf0f30c39e1d8bea9e57fc4"
}