echo Would you like to upgrade to osu!lazer version number: $x3 read -r -p "Type [Y/N] to confirm decision: " response case "$response" in [yY][eE][sS]|[yY])\ clear rm -f ~/Documents/lazerversion.txt echo $x3 >> ~/Documents/lazerversion.txt echo osu!lazer Updater echo ----------------- echo Updating. x4=$(sed -n '/browser_download_url/p' ~/Documents/releasefull.txt | head -2) echo $x4 >> ~/Documents/tempresult.txt fold -s -w80 ~/Documents/tempresult.txt ;; *) clear echo osu!lazer Updater echo ----------------- echo Goodbye. ;; esac
Проблема в fold -s -w80 ~/Documents/tempresult.txt
fold -s -w80 ~/Documents/tempresult.txt
"browser_download_url": "https://github.com/ppy/osu/releases/download/2018.915.0/install.exe" "browser_download_url": "https://github.com/ppy/osu/releases/download/2018.915.0/osu.app.zip" "browser_download_url": "https://github.com/ppy/osu/releases/download/2018.915.0/install.exe" "browser_download_url": "https://github.com/ppy/osu/releases/download/2018.915.0/osu.app.zip" "browser_download_url": "https://github.com/ppy/osu/releases/download/2018.915.0/install.exe" "browser_download_url": "https://github.com/ppy/osu/releases/download/2018.915.0/osu.app.zip" "browser_download_url": "https://github.com/ppy/osu/releases/download/2018.915.0/install.exe" "browser_download_url": "https://github.com/ppy/osu/releases/download/2018.915.0/osu.app.zip" "browser_download_url": "https://github.com/ppy/osu/releases/download/2018.915.0/install.exe" "browser_download_url": "https://github.com/ppy/osu/releases/download/2018.915.0/osu.app.zip" "browser_download_url": "https://github.com/ppy/osu/releases/download/2018.915.0/install.exe" "browser_download_url": "https://github.com/ppy/osu/releases/download/2018.915.0/osu.app.zip" "browser_download_url": "https://github.com/ppy/osu/releases/download/2018.915.0/install.exe" "browser_download_url": "https://github.com/ppy/osu/releases/download/2018.915.0/osu.app.zip" "browser_download_url": "https://github.com/ppy/osu/releases/download/2018.915.0/install.exe" "browser_download_url": "https://github.com/ppy/osu/releases/download/2018.915.0/osu.app.zip" "browser_download_url": "https://github.com/ppy/osu/releases/download/2018.915.0/install.exe" "browser_download_url": "https://github.com/ppy/osu/releases/download/2018.915.0/osu.app.zip" "browser_download_url": "https://github.com/ppy/osu/releases/download/2018.915.0/install.exe" "browser_download_url": "https://github.com/ppy/osu/releases/download/2018.915.0/osu.app.zip"
Я получаю текст выше.
Я хочу получить это:
"browser_download_url": "https://github.com/ppy/osu/releases/download/2018.915.0/install.exe" "browser_download_url": "https://github.com/ppy/osu/releases/download/2018.915.0/osu.app.zip"
Приведенный выше текст выделен в отдельные строки.
Что-то не так с тем, как я использую fold -s -w80 ~/Documents/tempresult.txt
Исходный текст, который я хотел разбить на отдельные строки, был;
Заранее спасибо, Ритмическая
Не могли бы вы попробовать один раз.
awk '{$1=$1}1' OFS="\n" Input_file
OR
your_fold_command | awk '{$1=$1}1' OFS="\n"