Search Results

Search: Posts Made By: RudiC
283
Posted By RudiC
Show your actual directory structure EXPLICITLY,...
Show your actual directory structure EXPLICITLY, like
tree -d
.
├── D1
│ ├── D2
│ │ └── L1
│ ├── D3
│ │ └── L2
│ └── D4
│ ├── L1
│ ├── L2
│ └── L3
└── test...
Forum: Shell Programming and Scripting 6 Hours Ago
304
Posted By RudiC
Does lshwres interact directly with the terminal?...
Does lshwres interact directly with the terminal? Are there any options to disable this? I could sort of replicate the situation with stty:
ssh -n -t user@remotehost "hostname; stty"...
283
Posted By RudiC
Pls post your (representative, full breadth)...
Pls post your (representative, full breadth) directory structure down to "folder". Which you should do anyhow, always.
283
Posted By RudiC
Come on - cding to * cannot by all means happen...
Come on - cding to * cannot by all means happen unless each * expands to exactly one directory.
Forum: Shell Programming and Scripting 22 Hours Ago
304
Posted By RudiC
Your code snippet does not look like what you...
Your code snippet does not look like what you showed in post #1. Where do you get the error? Is it issued by ssh or by lshwres? Try changing -T to -t.


Split the problematic code into smaller...
167
Posted By RudiC
Added file "servers.txt" to read from.
Try
while read server
do sshpass -p 'abc' ssh -o StrictHostKeyChecking=no -q -t xyz@${server} awk -v"HN=$(hostname)" '/[mM]inimum/ {next} /PASS_MIN_LEN/{print HN, $2}' /etc/login.defs`
...
169
Posted By RudiC
Tryfind . -printf "%T@ %Tc %p\n" | sort -r | cut...
Tryfind . -printf "%T@ %Tc %p\n" | sort -r | cut -d" " -f2-
227
Posted By RudiC
The first posistional parameter is NOT an array,...
The first posistional parameter is NOT an array, and thus can't be indexed.


How about
verifyfiles() { for sym ; do echo "Array in FUNCTION Contains:"; echo "$sym"; done; }
.
.
....
169
Posted By RudiC
How far would find . -printf "%T@ %p\n" | sort...
How far would
find . -printf "%T@ %p\n" | sort -r
get you?
143
Posted By RudiC
How about echo "${1//\\\\n/$'\n'}" | awk '$5...
How about
echo "${1//\\\\n/$'\n'}" | awk '$5 {print "File is:", $5}'
File is: /app/scripts/testingscr5.scr
File is: /app/mrt/testingscr6.mrt
File is: /app/exe/testingscr9.exe
File is:...
296
Posted By RudiC
Try also (your code simplified): awk...
Try also (your code simplified):
awk 'length==80 {ORS=""} 1; {ORS=RS}' fileor
awk '{ORS=length==80?"":RS} 1' file

Your first attempt doesn't work as expected as ORS is never reset to RS, as...
209
Posted By RudiC
How about printf "Match Found for File: %s\n"...
How about
printf "Match Found for File: %s\n" /app/scripts/*$1*
240
Posted By RudiC
Or provide a default value in case harr[$j] is...
Or provide a default value in case harr[$j] is empty / unset:
if [ ${harr1[$j]:-1} -eq $search ]
then break
fi
371
Posted By RudiC
Shells don't expand variables within single...
Shells don't expand variables within single quotes.
272
Posted By RudiC
Any attempts / ideas / thoughts from your side? ...
Any attempts / ideas / thoughts from your side?
Your OS and shell?
334
Posted By RudiC
Given your uniq provides all the options shown,...
Given your uniq provides all the options shown, try
sort -k4,4 file | uniq -D -f3 -w5
40993876 4531 724 10154 Strep A
40993878 4533 724 10154 Strep B
40991764 2419 ...
280
Posted By RudiC
Yes, in your above example it will print alpha...
Yes, in your above example it will print alpha and beta, but in general, it will print the before-last field.
280
Posted By RudiC
It's the same as $NF - the last field in the...
It's the same as $NF - the last field in the input line regardless of its actual field number.
awk splits the line into n fields and then assigns n to NF (number of fields?) If you have three...
312
Posted By RudiC
As the number of / may vary with path depth, or...
As the number of / may vary with path depth, or with the locale date format, it might be safer to extract the relevant field first from that comma delimited file:
cut -d ',' -f 30 file
...
295
Posted By RudiC
In case there are other occurrences of three...
In case there are other occurrences of three letters followed by a space and a digit, you might want to narrow down the search pattern to the locale months:
sed -r "s/($(locale abmon | tr ';' '|'))...
958
Posted By RudiC
Thanks, MadeInGermany, for pointing that ssh -n...
Thanks, MadeInGermany, for pointing that ssh -n option out. Still, the commands are passed as such (no backtics ``!) to the remote server, so uname -r will be executed remotely.


The script was...
118
Posted By RudiC
Double post?...
Double post? https://www.unix.com/303039567-post8.html
416
Posted By RudiC
Is it possible to e.g. sort -t, -k2,2 -k4r...
Is it possible to e.g.

sort -t, -k2,2 -k4r -k3 file
416
Posted By RudiC
Will the data follow a certain sequence, i.e....
Will the data follow a certain sequence, i.e. parent dirs sorted, parent dir before child dir, non-empty $3 before empty $3, non-empty $4 before empty $4?
416
Posted By RudiC
Why does ...
Why does

level1,/level2/level3/level4/ora003,4,IBB25
show up in file2?
Showing results 1 to 25 of 500

 

Featured Tech Videos

All times are GMT -4. The time now is 10:45 AM.
Unix & Linux Forums Content Copyright 1993-2019. All Rights Reserved.
Privacy Policy