質問をすることでしか得られない、回答やアドバイスがある。

15分調べてもわからないことは、質問しよう!

新規登録して質問してみよう
ただいま回答率
85.47%
MacOS(OSX)

MacOSとは、Appleの開発していたGUI(グラフィカルユーザーインターフェース)を採用したオペレーションシステム(OS)です。Macintoshと共に、市場に出てGUIの普及に大きく貢献しました。

Q&A

解決済

2回答

2425閲覧

macのターミナルでコマンドを打ったが、エラーが出る

iwanharts

総合スコア32

MacOS(OSX)

MacOSとは、Appleの開発していたGUI(グラフィカルユーザーインターフェース)を採用したオペレーションシステム(OS)です。Macintoshと共に、市場に出てGUIの普及に大きく貢献しました。

0グッド

0クリップ

投稿2016/05/05 08:50

###前提・実現したいこと
[sdiff]コマンドを打ちたいが、うつとエラーが出る
te.txtとxt.txtをマージしてe.txtに出力

オプション-sや-Wをつけるとエラーが出る
なんででしょうか

###発生している問題・エラーメッセージ

$ sdiff -os e.txt te.txt xt.txt sdiff: extra operand `xt.txt' sdiff: Try `sdiff --help' for more information.

###試したこと

$ sdiff -o e.txt te.txt xt.txt

このように打つと上手く動く

###補足情報(言語/FW/ツール等のバージョンなど)
より詳細な情報

気になる質問をクリップする

クリップした質問は、後からいつでもMYページで確認できます。

またクリップした質問に回答があった際、通知やメールを受け取ることができます。

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

guest

回答2

0

ベストアンサー

-os だと、sが出力ファイル名とみなされます。
-s -oもしくは-soだといいかと。

投稿2016/05/05 08:59

otn

総合スコア84710

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

iwanharts

2016/05/05 09:11

上手くいきました! ありがとうございます!
guest

0

Try `sdiff --help' for more information.

とでているので、試してみましょう。

$ sdiff --help Usage: sdiff [OPTION]... FILE1 FILE2 Side-by-side merge of file differences. -o FILE --output=FILE Operate interactively, sending output to FILE. -i --ignore-case Consider upper- and lower-case to be the same. -E --ignore-tab-expansion Ignore changes due to tab expansion. -b --ignore-space-change Ignore changes in the amount of white space. -W --ignore-all-space Ignore all white space. -B --ignore-blank-lines Ignore changes whose lines are all blank. -I RE --ignore-matching-lines=RE Ignore changes whose lines all match RE. --strip-trailing-cr Strip trailing carriage return on input. -a --text Treat all files as text. -w NUM --width=NUM Output at most NUM (default 130) columns per line. -l --left-column Output only the left column of common lines. -s --suppress-common-lines Do not output common lines. -t --expand-tabs Expand tabs to spaces in output. -d --minimal Try hard to find a smaller set of changes. -H --speed-large-files Assume large files and many scattered small changes. --diff-program=PROGRAM Use PROGRAM to compare files. -v --version Output version info. --help Output this help. If a FILE is `-', read standard input.

つまり、
-o FILE と指定する必要があるので、 -os や -oW は不正になる。
-so FILE や -Wo FILE なら OK。
-s -o FILE や -W -o FILE とするほうが良さそう。

投稿2016/05/05 09:44

katoy

総合スコア22324

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

あなたの回答

tips

太字

斜体

打ち消し線

見出し

引用テキストの挿入

コードの挿入

リンクの挿入

リストの挿入

番号リストの挿入

表の挿入

水平線の挿入

プレビュー

15分調べてもわからないことは
teratailで質問しよう!

ただいまの回答率
85.47%

質問をまとめることで
思考を整理して素早く解決

テンプレート機能で
簡単に質問をまとめる

質問する

関連した質問