עבור לתוכן
View in the app

A better way to browse. Learn more.

HWzone

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

הדפסת פלט Stderr של תוכנית לקובץ ב-Linux Shell

Featured Replies

פורסם

שלום לכולם. אני מעוניין להעביר פלט של תוכנית שרצה בלינוקס בקונסולה, לקובץ טקסט.

בדר"כ הייתי כותב:

prog > a.txt

אבל הבעיה שהתוכנית מוציאה פלט ל-Standard error ולא ל-standard input, אז זה לא עובד.

יש דרך אחרת?

עריכה:

הצלחתי, משום מה זה עובד לי רק ב-bash. כותבים

prog 2> a.txt

פורסם

הshell עושה את הredirection, ולכן זה אולי לא יעבוד לך בshells אחרים. איפה אתה עוד רוצה שזה יעבוד?

פורסם
  • מחבר

זה לא כל כך משנה לי.

כמו שכתבתי בעריכה, הצלחתי להשתמש בפקודה אחרי שנכנסתי ל-bash. מבחינתי זה מספיק (הייתי צריך לעשות diff חד פעמי על פלט של שתי תוכניות).

תודה בכל אופן.

ארכיון

דיון זה הועבר לארכיון ולא ניתן להוסיף בו תגובות חדשות.

דיונים חדשים

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.