Supposing I want to output the following code to the screen in a bash script, this works fine until you use variables as below, because the variable could be of any length, meaning the screen output for line 2 will have the ultimate # out of alignment.
Is there a simple way round this?
I have looked at hidden characters in vim using :set invlist but am a bit stumped.
is there any way to align my text so every column begins on the same line as the previous line?
here's my command:
printf "THEN ( ${SEARCHPATTB} = Hour = ${CALTOTB} ) %8s => %8s NOW ( ${SEARCHPATT} = Hour = ${CALTOT} ) %7s => %7s Reduced By: %7s -${RESULT}"\\n
output i'm currently getting... (2 Replies)
I have a large text file in following format
cat input.txt
abc
qwert
qwer
afweferf
wdfwefwe ==> kjhjkwdd
mnmn ==> jkjkjwekj
poiu ==> lklklke
tytyutut ==> olkjmnsmn
I need to align those lines with the characters " ==>" . I dont want to disturb the lines which dont have "==>".
The... (6 Replies)
Hi Guys,
How can you align data getting the UID, GID HOSTNAME in same column
input:
server1
uid=1010(faculty) gid=700(teacher) groups=700(teacher), 800(models)
student:x:500:500:student:/home/student:/bin/bash
server2
uid=1010(OSAD) gid=700(teacher) groups=700(teacher), 809(staff)... (5 Replies)
Hello friends
Please help me to display the content of a file in specific aligned manner.
for ex.
the content of the file may be
>$TEST
WELCOME
HI
HELLO
UNIX
SHELL
SCRIPTING
>$
I want to display the content like
.
TEST WELCOME HI
HELLO ... (18 Replies)
Hi folks,
I was running many commands using root and closed the session.
I would like to see if there is a way to go back to the server and see those screens so I can remember what I did the next time I need to do that.
Thanks a bunch! (3 Replies)
Hi,
I have tcp/ip client server programs which will communicate through reqest,reply c-structures.
As the sizeof(struct) may give different value between client and server programs, how do i align properly for boundary conditions.
Could anybody please give some suggestion.
Thanks in... (3 Replies)
Hello Everybody
I recently got this beautiful shell script from my friend. I like to share it with every body as I am bit new to shell scripting enviorment. I hope people in this site will like it. It is related to checking the filesystem threshold limit. After getting threshold limit of... (0 Replies)