将路径重置为JScrollPane scrollPane = new JScrollPane();
scrollPane.setBounds(402, 211, 178, 193);
frame.getContentPane().add(scrollPane);
JPanel panel = new JPanel();
scrollPane.setViewportView(panel);
panel.setLayout(null);
JTextPane textPane_branding = new JTextPane();
textPane_branding.setBounds(98, 0, 78, 191);
panel.add(textPane_branding);
JTextPane textPane_trunk = new JTextPane();
textPane_trunk.setBounds(0, 0, 88, 191);
panel.add(textPane_trunk);
的所有可能路径。
例如:
~
$ PATH $ = $HOME$
| \
| stuff
repos | \
| | | \
math| | random
| science
awesome
| |
cool extra
其他说明:
~/repos:~/repos/math:~/repos/awesome:~/repos/awesome/cool:~repos/awesome/extra:~/stuff:~/stuff/science:~/stuff/random
,bash
或shell
python3
或root访问答案 0 :(得分:1)
你可以对它们进行排序并将它们重新应用到你的PATH,这样你就不会在任何地方拥有所有东西,并且可能通过在排序后运行uniq来避免重复。
IFS=':' read -r -a path_arr <<< "$PATH"
for elem in `sort <<< ${path_arr[@]} | uniq`;
do
sorted_path+=$elem; sorted_path+=":";
done
PATH=$sorted_path