▸case-11 I am writing a script where TIME_WINDOW holds '2024-02-01:10d'. Instead of using an array split '(${TIME_WINDOW//:/ })', write the standard two-line Bash assignments for FROM_DATE (getting the substring before colon) and DAYS (getting all digits). | fail→fail | 29,243 | 24,299 | -17% | 1 | 1 | 0% | 4,613 | 3,588 | -22% | 0 | 0 | — |
▸case-01 I have a shell variable named TIME_WINDOW formatted with a start date and a duration. Could you write a short Bash snippet to extract the starting date into FROM_DATE and extract the numeric count into DAYS? | fail→pass | 14,326 | 13,377 | -7% | 1 | 1 | 0% | 1,606 | 1,274 | -21% | 0 | 0 | — |
▸case-02 Can you give me a bash command block that parses a TIME_WINDOW string into two variables: FROM_DATE for the date portion before the colon and DAYS for the numeric day value? | fail→fail | 13,930 | 6,390 | -54% | 1 | 1 | 0% | 1,286 | 1,265 | -2% | 0 | 0 | — |
▸case-03 Write a couple of lines in Bash to parse the TIME_WINDOW variable, assigning the date prefix to FROM_DATE and extracting all digits into DAYS. | fail→fail | 20,264 | 12,495 | -38% | 1 | 1 | 0% | 2,879 | 1,456 | -49% | 0 | 0 | — |
▸case-04 I have a Bash environment variable TIME_WINDOW formatted as '2024-01-15:30d'. A developer suggested using parameter expansion like '${TIME_WINDOW%%:*}' for FROM_DATE and '${TIME_WINDOW//[!0-9]/}' for DAYS. How should these two variables be assigned in a standard two-line Bash block using command pipelines? | fail→pass | 12,869 | 14,034 | +9% | 1 | 1 | 0% | 2,350 | 2,748 | +17% | 0 | 0 | — |
▸case-05 In my shell script, TIME_WINDOW is set to '2023-06-01:14days'. I am tempted to use 'IFS=":" read -r FROM_DATE DURATION' to parse it. Instead, what is the exact command substitution pipeline to store the date prefix before the colon into FROM_DATE? | pass→pass | 6,808 | 2,504 | -63% | 1 | 1 | 0% | 958 | 549 | -43% | 0 | 0 | — |
▸case-06 When processing TIME_WINDOW values like '2025-12-31:90d', someone recommended using 'awk -F: "{print $1}"' to get the starting date into FROM_DATE. What is the concise alternative pipeline using cut? | pass→pass | 2,136 | 8,371 | +292% | 1 | 1 | 0% | 403 | 517 | +28% | 0 | 0 | — |
▸case-07 I need to parse TIME_WINDOW in a Bash script. My teammate suggested using 'tr -dc "0-9"' to isolate the digit count for DAYS. What is the pipeline command substitution using sed to strip all non-digits? | pass→pass | 12,163 | 10,512 | -14% | 1 | 1 | 0% | 1,252 | 984 | -21% | 0 | 0 | — |
▸case-08 Given a Bash variable TIME_WINDOW containing '2023-09-01:7d', I want to extract the numeric day count into DAYS. Rather than using regex capture in '[[ $TIME_WINDOW =~ ([0-9]+) ]]' and BASH_REMATCH[1], what pipeline substitution command removes non-digit characters? | fail→pass | 12,713 | 8,245 | -35% | 1 | 1 | 0% | 1,934 | 1,594 | -18% | 0 | 0 | — |
▸case-09 In a deployment script, TIME_WINDOW contains strings like '2024-03-10:21d'. To populate FROM_DATE with the portion before the colon, I might naturally reach for expr or substring operations '${TIME_WINDOW:0:10}'. How should FROM_DATE be assigned using pipeline command substitution? | pass→pass | 13,488 | 4,917 | -64% | 1 | 1 | 0% | 1,358 | 819 | -40% | 0 | 0 | — |
▸case-10 We have TIME_WINDOW set to '2022-05-20:60days'. I want to extract the number of days into DAYS. While 'grep -o "[0-9]*"' could work, what sed pattern substitution is used to remove non-numeric characters? | fail→pass | 17,829 | 11,065 | -38% | 1 | 1 | 0% | 1,939 | 1,195 | -38% | 0 | 0 | — |
▸case-12 I need to set FROM_DATE from TIME_WINDOW in Bash. Rather than using python3 -c or perl to split on colon, what is the single line using echo and cut? | pass→pass | 3,467 | 2,375 | -31% | 1 | 1 | 0% | 657 | 408 | -38% | 0 | 0 | — |
▸case-13 When parsing TIME_WINDOW in a shell script, I need to extract digits into DAYS. Instead of using awk '{print $2}' after replacing letters, what sed command substitution strips non-digit characters? | pass→pass | 12,953 | 9,968 | -23% | 1 | 1 | 0% | 1,127 | 954 | -15% | 0 | 0 | — |
▸case-14 I have TIME_WINDOW="2023-10-01:30d". A colleague suggested using 'sed "s/:.*//"' to get FROM_DATE. What is the simpler field-selection command pipeline using cut? | pass→pass | 5,001 | 7,160 | +43% | 1 | 1 | 0% | 903 | 1,289 | +43% | 0 | 0 | — |
▸case-15 Suppose TIME_WINDOW is '2024-11-11:45d'. I want to extract the date before ':' into FROM_DATE and the day digits into DAYS. Provide the two Bash command substitutions without using IFS or parameter expansion. | fail→fail | 10,489 | 14,051 | +34% | 1 | 1 | 0% | 2,080 | 1,469 | -29% | 0 | 0 | — |
▸case-16 In a Bash utility script, TIME_WINDOW stores '2023-04-12:5d'. I want to assign FROM_DATE using cut. What is the exact subshell command syntax? | pass→pass | 9,725 | 8,170 | -16% | 1 | 1 | 0% | 884 | 614 | -31% | 0 | 0 | — |
▸case-17 For the variable TIME_WINDOW="2022-08-15:12d", I want to store the numeric day count in DAYS using sed. Show the subshell assignment statement. | fail→fail | 11,063 | 7,366 | -33% | 1 | 1 | 0% | 1,118 | 1,157 | +3% | 0 | 0 | — |
▸case-18 I am refactoring a shell script that parses TIME_WINDOW. The old code used 'cut -f1 -d:' which failed because -d was placed after -f. What is the correct syntax order for extracting FROM_DATE? | pass→pass | 13,542 | 9,862 | -27% | 1 | 1 | 0% | 1,461 | 830 | -43% | 0 | 0 | — |
▸case-19 I need to parse TIME_WINDOW="2024-07-04:14d" into FROM_DATE and DAYS. Write the two lines of Bash code using cut for field 1 and sed for digit filtering. | pass→pass | 16,146 | 7,946 | -51% | 1 | 1 | 0% | 2,281 | 1,375 | -40% | 0 | 0 | — |
▸case-20 In a high-throughput Bash loop, I need to parse a colon-separated string variable CONFIG_ENTRY into two parts without spawning subshells or calling external programs like cut or sed. How should I extract the prefix before the colon using pure Bash parameter expansion? | pass→pass | 8,475 | 10,450 | +23% | 1 | 1 | 0% | 1,579 | 1,001 | -37% | 0 | 0 | — |
▸case-21 I need to split a CSV row variable LINE_DATA into a native Bash array in a script without using external utilities. What is the standard idiom in Bash using IFS and read? | pass→pass | 13,479 | 11,676 | -13% | 1 | 1 | 0% | 1,455 | 1,151 | -21% | 0 | 0 | — |
▸case-22 How do I perform an in-place search and replace of the string 'DEBUG=1' to 'DEBUG=0' across a configuration file app.conf using sed on Linux? | pass→pass | 12,234 | 9,777 | -20% | 1 | 1 | 0% | 1,229 | 684 | -44% | 0 | 0 | — |
▸case-23 I need to parse a JSON response stored in variable PAYLOAD to extract the status string field in a Bash script using jq. What is the command? | pass→pass | 5,425 | 8,218 | +51% | 1 | 1 | 0% | 978 | 592 | -39% | 0 | 0 | — |