Search Results

Search: Posts Made By: zerofire123
10,453
Posted By zerofire123
testing postgres connection in shell script
I have a script that does db query in postgres. I'm trying to put in some error checking in the script. I keep running into the password prompt problem where when invalid credentials/or database is...
3,269
Posted By zerofire123
Thanks a lot for your help guys! I'll try to...
Thanks a lot for your help guys! I'll try to customize it to fit what i need
3,269
Posted By zerofire123
printing 3 files side by side based on similar values in rows
Hi I'm trying to compare 3 or more files based on similar values and outputting them into 3 columns.

For example:
file1
ABC
DEF
GHI

file2
DEF
DER

file3
ABC
DER

The output should...
3,913
Posted By zerofire123
Thanks! that worked great. Do you mind explaining...
Thanks! that worked great. Do you mind explaining how does the length option work?
3,913
Posted By zerofire123
using awk to omit certain characters
I have a file called file.txt with multiple lines in them. I'm trying to remove the first 2 characters and the last 2 with awk.


'.batman')
'.superman')
'.dragonheart')
.'superduper')
I tried...
32,702
Posted By zerofire123
if/else comparison with wildcard
This might be a simple answer but I can't for my life figure it out. If I input "bat", how do I get the condition to pick it up with the wild card *at*.


#!/bin/bash

read -p "enter" BOO

if...
2,845
Posted By zerofire123
THANKS!!
THANKS!!
2,845
Posted By zerofire123
finding the 5 newest files in a directory
I have a folder that has new files created everyday, is there a way i can filter them so that only the 5 newest files are displayed? I'm hoping this can be done by a one liner without a script.
...
7,542
Posted By zerofire123
I tried the above, but if I do echo ABC >>...
I tried the above, but if I do

echo ABC >> file.txt

it is not showing any live output, ABC is being written to file.txt, but the tail -f does not seem to work with tr.
7,542
Posted By zerofire123
Sorry I actually made a mistake in my original...
Sorry I actually made a mistake in my original post. The output should only show the lines that contain 'C' also.

by just running tail -f file | tr B F will putput the ZZZ lines as well.
7,542
Posted By zerofire123
using tail -f and tr in a script
I have file that is being constantly written to

example: file.txt
ABC
EBC
ZZZ
ABC

I am trying to create a simple script that will tail this file and at the same time using tr to change B...
2,800
Posted By zerofire123
thank you. worked perfectly
thank you. worked perfectly
2,800
Posted By zerofire123
getting the sum of numbers
I basically have a file where I had to do a bunch of greps to get a list of numbers

example: a file called numbers.txt

10000
10000
superman
10000
batman
10000
10000

grep '100' * |
...
Showing results 1 to 13 of 13

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