как избежать переопределения файлов несколькими пользователями [дубликаты]

Другой способ отображения объектов в консоли - JSON.stringify. Оформить заказ ниже:

var gandalf = {
  "real name": "Gandalf",
  "age (est)": 11000,
  "race": "Maia",
  "haveRetirementPlan": true,
  "aliases": [
    "Greyhame",
    "Stormcrow",
    "Mithrandir",
    "Gandalf the Grey",
    "Gandalf the White"
  ]
};
//to console log object, we cannot use console.log("Object gandalf: " + gandalf);
console.log("Object gandalf: ");
//this will show object gandalf ONLY in Google Chrome NOT in IE
console.log(gandalf);
//this will show object gandalf IN ALL BROWSERS!
console.log(JSON.stringify(gandalf));
//this will show object gandalf IN ALL BROWSERS! with beautiful indent
console.log(JSON.stringify(gandalf, null, 4));
-1
задан Beth Mckey 29 March 2019 в 05:09
поделиться

1 ответ

попробуйте это

TEMP=$(mktemp)                  # create unique tempfile
while read line; do             # read one line from inputfile
    # do what you want, e.g
    echo "($line)" >> $TEMP     # only an example
done < inputfile                # use inputfile in while-loop
cat $TEMP                       
rm $TEMP                        # remove tempfile
0
ответ дан UtLox 29 March 2019 в 05:09
поделиться
Другие вопросы по тегам:

Похожие вопросы: