LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
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, 07:02 PM   #1
Linusovic
LQ Newbie
 
Registered: Apr 2016
Posts: 11

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, 08:39 PM   #2
wpeckham
LQ Guru
 
Registered: Apr 2010
Location: Continental USA
Distribution: Debian, Ubuntu, RedHat, DSL, Puppy, CentOS, Knoppix, Mint-DE, Sparky, VSIDO, tinycore, Q4OS,Manjaro
Posts: 5,591

Rep: Reputation: 2689Reputation: 2689Reputation: 2689Reputation: 2689Reputation: 2689Reputation: 2689Reputation: 2689Reputation: 2689Reputation: 2689Reputation: 2689Reputation: 2689
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, 05:52 AM   #3
Linusovic
LQ Newbie
 
Registered: Apr 2016
Posts: 11

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, 02:00 AM   #4
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872
Blog Entries: 12

Rep: Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053
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, 08:21 AM   #5
jpollard
Senior Member
 
Registered: Dec 2012
Location: Washington DC area
Distribution: Fedora, CentOS, Slackware
Posts: 4,912

Rep: Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513
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 08:22 AM.
 
  


Reply



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
[SOLVED] VIM syntax highlighting: Use of AWK syntax inside shell scripts kaiserkarl13 Programming 1 03-03-2021 09:59 AM
From the command line What is the syntax syntax to import some data into mysql table Glenn D. Linux - Software 1 03-13-2015 09:26 AM
[SOLVED] syntax problem ted_chou12 Linux - Newbie 3 04-01-2011 01:43 AM
Syntax problem thort Linux - Newbie 9 12-22-2003 03:08 PM
syntax problem jackopa Linux - Software 0 05-07-2002 11:22 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 11:21 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
Open Source Consulting | Domain Registration