All Questions

Tagged with
Filter by
Sorted by
Tagged with
2
votes
1answer
133 views

Expect wigs out when I use the single quote in [exec ls -h | grep '\.foo' ]

I am trying to store a list of specific files into a variable in expect. In my script, I am trying to compile files that have different file extensions, like .foo, .bar. In this example, I have the ...
1
vote
1answer
443 views

Overwrite file using AWK in a for loop

I'm working on the following script: !/bin/bash FILE1=dispositivoss.csv NUMERODISP="$(wc -l $FILE1 | awk '{print $1}')" for (( c=2; c<=$NUMERODISP; c++ )) do IP=$(awk -vnum="$c" 'NR == ...
1
vote
1answer
5k views

grep IP addresses in expect script

This is part of code in an expect script, I have a problem with searching IP addresses from a file whose name is in the variable $filename. #!/usr/local/bin/expect -- ###Made by Etihkru#### set env(...