Search Results

Search: Posts Made By: JimJ
13,477
Posted By JimJ
Print a horizontal word vertically.
Say I have the word:

zinger

I want to change it to print

z
i
n
g
e
r


This is for a sorting algorithm that I am testing out. I will then use sort on the vertical and change it back...
5,105
Posted By JimJ
Update. saifurshaon, if I am wrong and this...
Update.

saifurshaon, if I am wrong and this isn't a homework problem. I am sorry, but it looks like one of many I have seen on these boards over the years.

One way to not have something look...
5,105
Posted By JimJ
Don't do people's homework assignments! It...
Don't do people's homework assignments!

It is against the Unix forum policy and just encourages them to keep coming back and continue posting homework problems to be done by the very helpful and...
3,289
Posted By JimJ
A couple of books
I highly recommend the following:


Learning The Bash Shell
Unix Shell Programming, Third Edition
Bash Cookbook


I did a review of the Bash Cookbook...
5
1,783
Posted By JimJ
Some other ways of doing this
You could do this with cut this way:


#!/bin/bash

OLDSTRING="2007-10-03"
YEAR=$(echo "${OLDSTRING}" | cut -d"-" -f1)
MONTH=$(echo "${OLDSTRING}" | cut -d"-" -f2)
DAY=$(echo "${OLDSTRING}" |...
4,795
Posted By JimJ
You're welcome...
No problem. Glad to help.
6,732
Posted By JimJ
Cool, but...
I've looked at fail2ban a couple of times.

The one problem I can possibly see is if someone spoofed the address of a computer that you usually use to access the server.

Is it theoretically...
2,619
Posted By JimJ
I second that
Jacoden and Radouluv, you guys are really good at this stuff.

If you have a moment to break down the thought process behind some of your solutions, I know that many people would benefit.
...
8,655
Posted By JimJ
Here's another
#!/bin/bash
# Move text in a file ($1)
while read LINE
do
FIELD1=$(echo ${LINE} | cut -d"?" -f1)
FIELD2=$(echo ${LINE} | cut -d"?" -f2)
echo "${FIELD2}|${FIELD1}?"
done < $1


Just to...
9,444
Posted By JimJ
More info...
Can you give us some pseudo code (or cleaned up actual code) that we can look at to see what you want exactly?
3,518
Posted By JimJ
Slight modification...
The copy part can be with redirection

head -n 100 file > newfile
4,795
Posted By JimJ
One possible way, if I understand your question...
Say you have a directory structure that looks like this:


.
`-- test1
|-- file1
|-- file2
|-- file3
`-- test2
|-- file4
|-- file5
|-- file6
...
Showing results 1 to 12 of 12

 
All times are GMT -4. The time now is 06:37 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy