LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 04-06-2016, 08:02 PM   #1
Linusovic
LQ Newbie
 
Registered: Apr 2016
Posts: 3

Rep: Reputation: Disabled
Syntax problem.


Hello, as a desperate man i'm asking you guys as the last solution to a very simple question.


Pathetic attempt :

seq 10 > file1 && file2

I'm trying to load 1 - 10 into both files (does not require to be .txt files) .

How do i simply do it?

Much love // Linusovic
 
Old 04-06-2016, 09:39 PM   #2
wpeckham
Senior Member
 
Registered: Apr 2010
Location: USA
Distribution: Debian, Ubuntu, Fedora, RedHat, DSL, Puppy, CentOS, Knoppix, Mint-DE, Sparky, Vsido, tinycore, Q4OS
Posts: 1,650

Rep: Reputation: 569Reputation: 569Reputation: 569Reputation: 569Reputation: 569Reputation: 569
Read the RIGHT manual!

Quote:
Originally Posted by Linusovic View Post
Hello, as a desperate man i'm asking you guys as the last solution to a very simple question.


Pathetic attempt :

seq 10 > file1 && file2

I'm trying to load 1 - 10 into both files (does not require to be .txt files) .

How do i simply do it?

Much love // Linusovic
Code:
man tee
and google for example using tee. I use it all the time, it makes this easy.
 
Old 04-07-2016, 06:52 AM   #3
Linusovic
LQ Newbie
 
Registered: Apr 2016
Posts: 3

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by wpeckham View Post
Code:
man tee
and google for example using tee. I use it all the time, it makes this easy.
Thanks a lot!
 
Old 04-09-2016, 03:00 AM   #4
ondoho
Senior Member
 
Registered: Dec 2013
Posts: 4,176

Rep: Reputation: 835Reputation: 835Reputation: 835Reputation: 835Reputation: 835Reputation: 835Reputation: 835
in this particular case, i'd simply use
Code:
seq 10 > file1; seq 10 > file2
and btw, file1 and file2 are text files, regardless of the extension. welcome to linux.
 
Old 04-09-2016, 09:21 AM   #5
jpollard
Senior Member
 
Registered: Dec 2012
Location: Washington DC area
Distribution: Fedora, CentOS, Slackware
Posts: 4,602

Rep: Reputation: 1241Reputation: 1241Reputation: 1241Reputation: 1241Reputation: 1241Reputation: 1241Reputation: 1241Reputation: 1241Reputation: 1241
Quote:
Originally Posted by ondoho View Post
in this particular case, i'd simply use
Code:
seq 10 > file1; seq 10 > file2
and btw, file1 and file2 are text files, regardless of the extension. welcome to linux.
Welll, they are text files if and only if the source is a text file (which is is with the seq utility).

"text file" is a bit of a misnomer on Linux - it depends on your font. Using UTF-8 allows for up to 3 bytes per glyph, and if one of those is the first "character" in the file, the file will show up as "data", and not "text".

A file is a sequence of 8 bit bytes. It MAY be text... but doesn't have to be.

Last edited by jpollard; 04-09-2016 at 09:22 AM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
From the command line What is the syntax syntax to import some data into mysql table Glenn D. Linux - Software 1 03-13-2015 10:26 AM
VIM syntax highlighting: Use of AWK syntax inside shell scripts kaiserkarl13 Programming 0 11-13-2012 11:04 AM
[SOLVED] syntax problem ted_chou12 Linux - Newbie 3 04-01-2011 02:43 AM
Syntax problem thort Linux - Newbie 9 12-22-2003 04:08 PM
syntax problem jackopa Linux - Software 0 05-08-2002 12:22 AM


All times are GMT -5. The time now is 06:22 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration