Posts by noob • 36 points
4 posts
-
0
votes2
answers175
viewsA: Confirmation of site or host service status
An example bro! can not format the text on this site sorry! more should help your problem! status=$(Curl -s --head google.com | awk '$2 ː "200" ') if [ -n "$status" ]; then echo "operating web…
-
1
votes1
answer69
viewsA: Editing file with shell script links
a simpler way would be: awk -i inplace -F "[/,]" '{print $8".rar"}' links.txt cat links.txt Thundercats-EP001.rar Thundercats-EP002.rar. Thundercats-EP003.rar…
-
0
votes3
answers538
viewsA: Replace a line from a bash script file
another ex: cat file.txt line test1 Linha2 test line test3 awk 'NR==2 {sub($0, "new line")}1' file.txt line test1 new line line test3 NR Contains the current record number (line number) sub The…
-
1
votes2
answers246
viewsA: AWK regular expression print inside brackets
You can use this command: awk -F = '/90668$/{print $NF}' arquivo The option -F specifies that "=" is a field separator! awk searches the file for the default value /90668$/ the character $ (final)…