Comments for Linux In The Shell http://www.linuxintheshell.org An exploration of Linux commands in the Bash Shell Thu, 07 Nov 2013 18:36:13 +0000 hourly 1 http://wordpress.org/?v=3.7.1 Comment on Episode 032 – cat by dannSWashko http://www.linuxintheshell.org/2013/06/18/episode-032-cat/#comment-145630 Thu, 07 Nov 2013 18:36:13 +0000 http://www.linuxintheshell.org/?p=610#comment-145630 Ok so you are putting this line in right:

cat > test.sh << “EOF”

When hitting enter you are presented with a blank line you can type in. All that you type will be catted to the file test.sh until there is a single line with just EOF on it. EOF has to be on the line by itself. Also make sure you are using << and not <.

You can actually substitue just about anything for “EOF” like say “stop now”. But then to close this redirection and write to the file you have to have, on a line by itself, stop now.

]]>
Comment on Episode 032 – cat by Mat http://www.linuxintheshell.org/2013/06/18/episode-032-cat/#comment-142470 Mon, 21 Oct 2013 00:37:34 +0000 http://www.linuxintheshell.org/?p=610#comment-142470 Hello,

It still is not posting correctly. The first line should be you command, then there should be a greater than sign in front of the I and it should be a new line.

]]>
Comment on Episode 032 – cat by Mat http://www.linuxintheshell.org/2013/06/18/episode-032-cat/#comment-142469 Mon, 21 Oct 2013 00:34:15 +0000 http://www.linuxintheshell.org/?p=610#comment-142469 Hello,

The first one did not paste correctly here is the output:

$ cat > test.sh < I am using cat as an editor
> it is simple but works
> this could be very useful
> EOF
> “EOF”
> ^C
$ cat test.sh
cat: test.sh: No such file or directory

]]>
Comment on Episode 032 – cat by Mat http://www.linuxintheshell.org/2013/06/18/episode-032-cat/#comment-142468 Mon, 21 Oct 2013 00:31:40 +0000 http://www.linuxintheshell.org/?p=610#comment-142468 Hello,

Good stuff but the last example did not work for me. Here is what i got:


$ cat > test.sh < I am using cat as an editor
> it is simple but works
> this could be very useful
> EOF
> "EOF"
> ^C
$ cat test.sh
cat: test.sh: No such file or directory

What did I do wrong?

]]>
Comment on Entries by dannSWashko http://www.linuxintheshell.org/entries/#comment-119848 Tue, 28 May 2013 18:44:05 +0000 http://www.linuxintheshell.org/?page_id=117#comment-119848 Here is a decent explanation to your question:

http://serverfault.com/questions/122364/linux-best-practices-for-hard-linking

Off the cuff – backups, content versioning software. Recall that unlike a symlink, a hard link shares the same innode and link to the data as the master but has a different file name or entry in the file table. Thus, if you delete the original file, the innode and data will still exist because the hard link still exists. That information is not removed until all link counter for the innode reaches zero. That is very different from a symbolic link where it is just a pointer to the file, it does not share the same innode. Deleting the original file does not preserve the innode or data if there is a symlink to the original file.

]]>
Comment on Episode 002 – tr by jaber aberburg http://www.linuxintheshell.org/2012/03/15/episode-002-tr/#comment-119492 Mon, 27 May 2013 10:28:43 +0000 http://www.linuxintheshell.org/?p=130#comment-119492 By the way,

This was my first attempt, which produced the same result:

for file in *.jpg?;do $file |tr -d ‘?’; done

yours,
JA

]]>
Comment on Episode 002 – tr by jaber aberburg http://www.linuxintheshell.org/2012/03/15/episode-002-tr/#comment-119491 Mon, 27 May 2013 10:27:22 +0000 http://www.linuxintheshell.org/?p=130#comment-119491 Hi,

I tried

for file in *.jpg?;do $(echo $file |tr -d ‘?’); done

but only get:
: command not found.jpg

Any idea why?

Thank you!
JA

]]>
Comment on Entries by Alison Chaiken http://www.linuxintheshell.org/entries/#comment-118014 Tue, 21 May 2013 16:46:02 +0000 http://www.linuxintheshell.org/?page_id=117#comment-118014 I’ve really enjoyed listening to all these episodes. I’ve been using Linux/Unix for nearly 30 years (yikes!) and am still learning new tricks from you. factor and seq, who knew? My bash scripts can be simplified now.

My one dangling question from an earlier episode is, what is the use case for a hard link? I see hard-links sometimes, but can’t think of an example they would be preferable to a sym link.

]]>
Comment on About by dannSWashko http://www.linuxintheshell.org/sample-page/#comment-117742 Mon, 20 May 2013 20:53:57 +0000 http://linuxintheshell.org/?page_id=2#comment-117742 Basically it is just me working on this although with feed back I get, especially from people like you and Pieter I am able to correct errors and omission much quicker!

]]>
Comment on Episode 022 – sort by dannSWashko http://www.linuxintheshell.org/2013/01/29/episode-022-sort/#comment-117741 Mon, 20 May 2013 20:52:46 +0000 http://www.linuxintheshell.org/?p=187#comment-117741 Ok I squeezed reverse in there but I have to spend a bit more time to get unique. Thanks for catching this!

]]>