New answers tagged

0 votes

linux + how to convert disk DEV name to humane reading

For pretty device names, use the -p parameter of the sar command : -p, --pretty Make reports easier to read by a human. This option may be especially useful when displaying e.g., ...
  • 437k
-1 votes

UDP: bad checksum + from the dmesg

This is caused by the checksum offloading. You can check in tcpdump or wireshark that the checksum is zero. This is because checksum processing happens on the hardware layer. Similar question was ...
  • 111
1 vote
Accepted

Using read -r within in-line shell scripting

I guess the $file variable you pass to sh is interpreted outside the sh context. You should try to escape the dollar sign : \$file. You can also add escaped quotes around \" to deal with filename ...
  • 386
0 votes

Using read -r within in-line shell scripting

The problem is not with read, the problem is with your incorrect use of quotes around $file. In the working example, when you use mv "$file" ..., the variable inside double-quotes is ...
  • 407k
0 votes

Using read -r within in-line shell scripting

$ bash -c "while IFS= read -r file; do echo mv .$file. /target_dir; done < /source_dir/list_of_files.txt" The "-quotes allows $file to be evaluated as you hit ENTER, taking the null ...
  • 8,436

Top 50 recent answers are included