Guest User

Untitled

a guest
May 22nd, 2018
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.13 KB | None | 0 0
  1. //liedtitel
  2. system( "grep -o \"number [0-9]\\{1,\\} on\" track_number.txt | grep -o -e \"[0-9]\\{1,\\}\" > tracknr.txt");
  3.  
  4. QFile txttitelzahl("/home/Daniel/QtExamples/parsertest/parsertest-build-desktop/tracknr.txt");
  5. txttitelzahl.open(QIODevice::ReadOnly);
  6. if(txttitelzahl.isOpen())
  7. {
  8. qDebug() << "Ausgabe: file geöffnet!";
  9. }
  10.  
  11. QString titelzahl = txttitelzahl.readAll();
  12. titelzahl.replace(" ","");
  13.  
  14. QString stringtitelzahl = "\"Track "+ titelzahl +"\" ";
  15.  
  16. stringtitelzahl.replace(QString("\n"), QString(" "));
  17.  
  18. txttitelzahl.close();
  19.  
  20. qDebug() << "Ausgabe: stringtitelanzahl:" << stringtitelzahl;
  21.  
  22. qDebug() << "Ausgabe: file geschlossen!";
  23.  
  24. //test1
  25. QString s1 = "grep -A 1 ";
  26. qDebug() << "Ausgabe: s1:" << s1;
  27. QString s2 = "tracks.txt > ergebnis.txt";
  28. qDebug() << "Ausgabe: s2:" << s2;
  29. QString s3 = s1 + stringtitelzahl + s2;
  30.  
  31. // s3.replace(QString("@"), QString("t"));
  32.  
  33. qDebug() << "Ausgabe: s3:" << s3;
  34.  
  35. const char* myChar = s3.toStdString().c_str();
  36.  
  37. qDebug() << "Ausgabe: myChar:" << myChar;
  38.  
  39. system(myChar);
Add Comment
Please, Sign In to add comment