Search Results

Search: Posts Made By: abdulbadii
883
Posted By abdulbadii
curl -L option is for that job: follow any...
curl -L option is for that job:
follow any redirection max to 50 times with --max-redirs curl command to go beyond that, get help;
curl --help
4,431
Posted By abdulbadii
GNU awk replacement, $ awk --version GNU Awk...
GNU awk replacement,
$ awk --version
GNU Awk 4.2.0, API: 2.0 (GNU MPFR 4.0.1, GNU MP 6.1.0)
Copyright (C) 1989, 1991-2017 Free Software Foundation.
4,431
Posted By abdulbadii
$ cat time 15:23:45,255 WARN <NTS> ...
$ cat time
15:23:45,255 WARN <NTS> RouteRequest : 518318 ### 15:23:45,258 CRIT <ISUP> RouteResponse : 518318

Must set local decimal character / delimiter to be ',' and thousand delimiter to be...
2,478
Posted By abdulbadii
awk 'NR==FNR { a[$1]=$4; next } {if ($2 ~...
awk 'NR==FNR { a[$1]=$4; next } {if ($2 ~ a["Array1"]) $2=a["Array2"]; print}' FS="= *{|, *|}" arrayfile FS=, inputfile
2,805
Posted By abdulbadii
try what @hergp suggested with re sed; sed...
try what @hergp suggested with re sed;

sed -r 's/(ulimit_n\w+?_status_)20480.sh/\140960.sh/gI'
2,127
Posted By abdulbadii
awk -F, 'NR==FNR { for (i=3;i<=NF;i++) arr[$1,i]...
awk -F, 'NR==FNR { for (i=3;i<=NF;i++) arr[$1,i] = ","$i; next } { print $0 arr[$1,($2+2)] }' file1 file2
830
Posted By abdulbadii
for a in `find /folder1 -type d ` { test -d...
for a in `find /folder1 -type d `
{
test -d "$a" || mkdir -p "${a##*/}"
}
1,649
Posted By abdulbadii
awk '/[1-9][0-9]* ?% packet loss/{if (a && a !~...
awk '/[1-9][0-9]* ?% packet loss/{if (a && a !~ /packet loss/) print a; print} {a=$0}' log_ping.txt
6,226
Posted By abdulbadii
isn't it possible an invisible character produced...
isn't it possible an invisible character produced ?
expect -i $bashId -re "\[snr_core.serconsole.con\s+info\]\s+Telnet\s+console\s+listening\s+to\s+port\s+\[0-9]+\." {send_user "The output is...
1,952
Posted By abdulbadii
for a in `find /p/w/d -type f -name '*.fna.gz'` ...
for a in `find /p/w/d -type f -name '*.fna.gz'`
{
d=${a%/*}
mv $a ${a%.*}.${d##*/}
}
1,633
Posted By abdulbadii
sed -r ':l /$/{ N; s/([^/])LF\n/\1/} ;bl' csvfile
sed -r ':l /$/{ N; s/([^/])LF\n/\1/} ;bl' csvfile
3,157
Posted By abdulbadii
while read -r a b do unset bd af [[ $b ]]...
while read -r a b
do
unset bd af
[[ $b ]] && bd=`locate $b`
[[ $bd ]] &&{ mkdir -p "/home/data/$b";: } || { echo "Not exist $b"; exit; }
[[ $a ]] af=`locate $a`
[[ $af ]] && cp -bfp "$a"...
2,485
Posted By abdulbadii
#!/bin/bash ...
#!/bin/bash
target=/fstest/INVESTIG/Sadiq/TEST_ARCH
while read -r line # is added && [[ -n $line ]]; better?
do
mv -fb $line $target && echo...
1,136
Posted By abdulbadii
How to find and get a file in an entire directory with an excluded directory specified?
How to get a file 'zlib.h' in an entire directory with an excluded directory specified lives under that starting directory by using find command, as it failed on:

$ find . -name 'zlib.h' -a...
1,659
Posted By abdulbadii
for i in /notinthatfolder/*.* { comm -12...
for i in /notinthatfolder/*.* {
comm -12 filetobecompared $i >filetobecompared-$i
}
1,939
Posted By abdulbadii
echo "This sentence has an undetermined ...
echo "This sentence has an undetermined number of spaces between
each word."| sed -r 's/\s+/ /g'
1,190
Posted By abdulbadii
How to download compressed archive zips in bulky automatically using wget?
How to download in bulky compressed (zip, 7z, bzip, xz, etc) archive files from a repository automatically by use of wget ?
1,505
Posted By abdulbadii
$ grep -Pie...
$ grep -Pie '.+?d\.2016\.2(0[89]|[1-7][0-9]|8[0-2])' /tmp/wrk >/tmp/wrk_done

if you want to sort in days order

$ grep -Pie '.+?d\.2016\.2(0[89]|[1-7][0-9]|8[0-2])' /tmp/wrk |sort...
5,763
Posted By abdulbadii
1. sort -dib -k26n,36n -o file_1.sorted file_1 ...
1. sort -dib -k26n,36n -o file_1.sorted file_1
sort -dib -k26n,36n -o file_2.sorted file_2

2. diff -aib -W222 file_1.sorted file_2.sorted

3. -W option is width limit (max char.) for a...
1,303
Posted By abdulbadii
use sed $ sed -r ':x /$/ { N; s/\n\s*/,/;...
use sed

$ sed -r ':x /$/ { N; s/\n\s*/,/; /s/\):,(Name:h)/\):\n\1; bx}' sourcefile
727
Posted By abdulbadii
Explanation for sort utility and its detail
I tried to use sort utility and typed sort --help, read one of lines; its -k option, and part of it:



I am really not getting it
Anyone do me a useful favor to save me out of my ignorance ?
...
730
Posted By abdulbadii
$ awk '{if ($6 > 12) { $6--}; if ($1 < 11)...
$ awk '{if ($6 > 12) { $6--}; if ($1 < 11) {$1+=2} print } ' File
6,190
Posted By abdulbadii
You first said time then, you followed...
You first said time


then, you followed it by saying,

that is Microsoft Timestamp:

but you gave command:
awk -F, '{"date +%s -d\""$1 "\""| getline dte;$1=dte}1' OFS="-500,"...
2,017
Posted By abdulbadii
awk -F, '{$1=$1}1' OFS=: 2.txt with no space...
awk -F, '{$1=$1}1' OFS=: 2.txt

with no space at all in {$1=$1}1
1:a
2:b
3:d
6,190
Posted By abdulbadii
OP means Microsoft Timestamp get it : Date...
OP means Microsoft Timestamp
get it : Date format converter (http://www.silisoftware.com/tools/date.php?inputdate=October+11%2C+2016+07%3A01%3A23am&inputformat=text)
Showing results 1 to 25 of 48

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