Shunting, in railway operations, is the process of sorting items of rolling stock into complete trains, or the reverse. In the United States this activity is known as switching.