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

Text formatting

I know I've been away from the forums for past couple of months. But I am back now : ) I used to hit ctrl+B and ctrl+I after selecting the text to make text bold or italic respectively. (Pressing the...

View Article


Open gnome-terminal with multi tabs and automatically run a script in each tab

Hi All , i am trying to create an alias to open a new gnome-terminal and run some commands in each tab & to have a specific name for each tab i am using csh , tried this command gnome-terminal...

View Article


Read 2 input and produce it in single ouput?

Hi all. I’ve 2 inputs here and would like to produce it in single ouput. I’ve drafted simple shell script but not sure how to put all this together. The final output should be “GROUP-XYZ” instead of...

View Article

Linux script for several cronjob

I have a linux server for my joomla website. I am importing xml feeds (around 200). The component give a tool which list all the cron job commands to automaticaly make the feeds import I don't want to...

View Article

Script needed to delete to the list of files in a directory based on last...

Hi My directory structure is as below. Code: dir1, dir2, dir3 I have the list of files to be deleted in the below path as below. Code: /staging/retain_for_2years/Cleanup/log $ ls -lrt total 0...

View Article


Perl compare decimal numbers

Hi, I need to compare two decimal values and find which is greater, Code: perl -e' $x=00.50; $y=01.00; if ( $x > $y ) { print "$x > $y"; } else{ print "$x < $y"; }' output : Code: 050 > 10...

View Article

Merging Multiple XLS into Different tabs in xls/ xlsx

HI, I have multiple files per dept in folder for eg : In a folder Code: File1_Dept100.xls File2_Dept100.xls File3_Dept100.xls File1_Dept200.xls File2_Dept200.xls File3_Dept200.xls Output should be :...

View Article

Why does it not work (Switch Case)?

Hi there, I'm trying to run a simple script,but i'm always getting this error Code: Syntax error: word unexpected (expecting "in") I have searched many sites,like this,but i dont get it,it looks good...

View Article


Sort command, more than one delimiter

I have the following file: Code: /vol/labor_vol1 /vol/labor_vol10 /vol/labor_vol11 /vol/labor_vol12 /vol/labor_vol13 /vol/labor_vol14 /vol/labor_vol15 /vol/labor_vol16 /vol/labor_vol17 /vol/labor_vol18...

View Article


Pass variable to awk command search string

I must have forgot how to do this, but, I am attempting to enter a variable into an awk / gawk search pattern. I am getting a value from user input to place in a specific section of a 132 character...

View Article

Connect AWS and Azure via OpenVPN

I am trying to connect two networks (AWS and Azure) together via OpenVPN. I am aware of other implementations (OpenSwan+Azure GW etc.) but I need maximal portability as I will be expanding this to...

View Article

Problem running zip from cron - bad zipfile offset

I've created a pretty straightforward shell script to do backups via rsync. Every night it rsyncs a copy of a website (approx 60GB) to the local machine. Once a week, after the rsync step, it zips the...

View Article

Extract content of .dump file

We have been provided a .dump file.The need is to extract the contents(may includes files and folder). ls -lZ didnt help me as Z is not a valid option. How to extract the file contents ?

View Article


Remove folder contents

Code: for dir in BKP/*/ do echo You are in :$dir done Code: O/P -- BKP/201448/ BKP/201449/ BKP/201450/ BKP/201451/ BKP/201452/ BKP/201501/ BKP/201502/ BKP/201503/ BKP/201504/ BKP/201505/ BKP/201506/...

View Article

Shell script to sftp files to file server.

Hi, I am looking for a shell script to sftp to a file server and copy all the files from a directory after the script is run. The server name should be a user input parameter and of-course the...

View Article


Image may be NSFW.
Clik here to view.

SFTP files to a file server.

Hi, I am looking for a shell script to sftp to a file server and copy all the files from a directory after the script is run. The server name should be a user input parameter and of-course the...

View Article

SFTP files to a server from Linux.

Hi, I am looking for a shell script to sftp to a file server and copy all the files from a directory after the script is run. The server name should be a user input parameter and of-course the...

View Article


Count occurrence of string (based on type) in a column using awk

Hello, I have a table that looks like what is shown below: Code: AA BB CC XY PQ RS AA BB CC XY RS I would like the total counts depending on the set they belong to: if search pattern is in Code: {AA,...

View Article

Do not allow bypassing users .profile

Hello, I find out that there is a way from putty to pass a command to your shell when trying to log in to a server and bypass .profile. Actually you can do this if you open a bash shell. The command to...

View Article

From perl program query is not executed.

I have tried executing one particular query through perl.But I am unable to get the result. When I tried to execute the sysdate query its working when I executed my perl code. The below query doesn't...

View Article
Browsing all 16232 articles
Browse latest View live