Quantcast
Channel: UNIX and Linux Forums
Browsing all 16232 articles
Browse latest View live
↧

How to split all columns into multiple columns?

Hi, all. How can I split all columns into multiple columns separated by tab? Input: Code: qq        ee        TT        12        m1 aa        gg        GG        34        2u zz        dd        hh...

View Article


What is Equalent to grep -p in Linux?

I am working on below command where as its working on AIX(UNIX) but not in linux . # Look for local databases HTML Code: DATABASES=$(db2 list database directory | grep -p Indirect | grep "Database...

View Article


Monitor Website

Hi all, i need to do the following, when i connect to my website it prints out "Welcome User", but sometimes there are errors like "dictionary not loaded" or "wrong user name or password" so i wanted...

View Article

Shell script to connect from one server to other

Dear Experts, I am new to the shell scripting. I am looking for a shell script to connect to one Unix/Linux server1 to other Unix/Linux server2 and trigger a SAP Event in that server2 (Which will...

View Article

Run this grep every 10 minutes and do something based on the output

OS : Red Hat Linux 6.4 Shell : Bash We have a file called status.txt which will have only 1 line. The content will be the string "Processing" for most of the day. Code: # cat status.txt Processing # I...

View Article


Trouble using awk command

Hi, I have 2 .txt pads containing data. I need a script which reads content of one .txt file, performs some operations and calculates a number which is stored in a variable. Now , all the content of...

View Article

Lftp sftp get - script renames the local file with suffix tilde

Hi, Below script used for sftp get, Code: #/bin/bash USER=xxx PASS=xxx HOST=xxx REMOTE_FILE=$1 LOCAL_FILE_LOC=$2 cd $LOCAL_FILE_LOC lftp sftp://$USER:$PASS@$HOST:10022 -e "get $REMOTE_FILE; bye" If...

View Article

Expect - bash and variables

I was wondering if anyone could provide some assistance. I trying to run an expect script within bash and get the results of a variable called RESULT. I Have tried a few things but none of them have...

View Article


How to loop read command and print valid invalid states.?

My question is how would i loop a read command to keep asking the user for input and eventually print the no. of valid invalid inputs after a specified control input typed i.e. (-3).

View Article


Output in table

Hi, I have a script which gives output as below: We want to extract the output which will contain only PoolManager and Total number of connections, and if possible in a table with two columns having...

View Article

Error on network card

Hi Please can you help me to understand what could be wrong based on what I have captured in the logs: I have run Code: cat /var/log/syslog | grep -i warn , and I got the following output Code:...

View Article

Interpreting multiple values from a variable

Hi, I am writing a shell script which will check the status of a resource in a cluster and then display nicely to a user running the script at command line. Basically the script runs a status command...

View Article

How to learn UNIX shell scripting?

Hi Guys, I know basic command of unix and basic programming of unix as like using for loop, while loop, if..else, case statement etc. then how to learn unix shell scripting as well as use also.

View Article


Image may be NSFW.
Clik here to view.

Need Help in extracting data from XML File

Hi All My input file is an XML and it has some tags and data rows at end. Starting of data rows is <rs:data> and ending of data rows is </rs:data>. Within sample data rows (2 rows) shown...

View Article

Image may be NSFW.
Clik here to view.

Renaming file in batch

Hi guys, I need a script to change the file names e.g.:- below are the mentioned files, i want t0 change the last character of the name 00000.cdr with e.g bep01.smsc.191214210500-00000.cdr to...

View Article


Debian Package Management "Inside" Question

Greetings. After rifling through the policy manual to some significant extent, I've come to a question which doesn't seem to have any forthcoming answer out "in the wild", so here it is :) During dpkg...

View Article

Help with SendMail Procmail filtering

Hi All, I am very new to Unix. I have a test server running FreeBSD 10.1 and SendMail 8.14.9. I need to filter incoming emails based on the sender's email address or domain and forward them to another...

View Article


Image may be NSFW.
Clik here to view.

Obfuscation Part II.

Hi guys... This sure is gonna raise a few eyebrows. Further to my shell obfuscation ideas from a previous post this is a derivative with ideas that work. Firstly the file 'obfuscate_master.sh' is...

View Article

Log archive

Hi, I am trying to move old file to archive folder. find /sourcedirectory/logs/* -type f -mtime +30 -exec mv "{}" /sourcedirectory/logs/archive \; The above command not only search for old file in...

View Article

Problem with Timestamp

Hi Team, i need some help on finding one hour back time. if current time is 5:18:22 means i have to find 4:18:22 i am having scenario to pull record which as got inserted morethan one hour back in...

View Article
Browsing all 16232 articles
Browse latest View live