小编Dev*_*air的帖子

如何在AWS Linux上安装Fish Shell

我似乎无法在AWS Linux实例上安装Fish shell。我不断收到以下错误,但似乎找不到解决方法。

[root@ip-172-31-20-125 ec2-user]# yum -y install fish
Loaded plugins: priorities, update-motd, upgrade-helper
Repository shells_fish_release_2 is listed more than once in the configuration
Resolving Dependencies
--> Running transaction check
---> Package fish.x86_64 0:2.5.0-1.2 will be installed
--> Processing Dependency: hostname for package: fish-2.5.0-1.2.x86_64
--> Finished Dependency Resolution
Error: Package: fish-2.5.0-1.2.x86_64 (shells_fish_release_2)
           Requires: hostname
 You could try using --skip-broken to work around the problem
 You could try running: rpm -Va --nofiles --nodigest
Run Code Online (Sandbox Code Playgroud)

linux shell amazon-web-services fish

2
推荐指数
1
解决办法
931
查看次数

打印其他只一次?

如何让我的其他打印只打印一次而不是每行不存在该字符串?我尝试通过回击几层来移动它,但它不起作用.我理解逻辑,但我不知道如何限制它.我正在为我的解析脚本添加一点点练习,随时学习,但是这个让我感到高兴.谢谢!

import csv
# Testing finding something specifical in a CSV, with and else
testpath = 'C:\Users\Devin\Downloads\users.csv'
developer = "devin"

with open (testpath, 'r') as testf:
    testr = csv.reader(testf)
    for row in testr:
        for field in row:
            if developer in row:
                print row
        else:
            print developer +  " does not exist!"
Run Code Online (Sandbox Code Playgroud)

python csv parsing for-loop python-2.7

-2
推荐指数
1
解决办法
546
查看次数

标签 统计

amazon-web-services ×1

csv ×1

fish ×1

for-loop ×1

linux ×1

parsing ×1

python ×1

python-2.7 ×1

shell ×1