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

Zipping files

Hi All, I have a scenario where in am using uuencode to send a txt file as an excel to end users( email attachment).I have 7 different files and these files are sent as emails 7 times... So my question...

View Article


Split file into multiple files based on first column

Hi, I have a file that I want to split into multiple files based on the first column. All records with the same first column value should be written to a new file named after that column and the new...

View Article


Question on regexp and match

Hello everyone, I'm new in tcl scripting. I'm currently studying a tcl script and came across this line: regexp {(\d+)(\S?)} $opts match opt swi According to my understanding, this line means to search...

View Article

Image may be NSFW.
Clik here to view.

How to remove Unicode from top of file?

Experts, this has been dumped on me at the last minute.... i am having issue on few files where im getting files from source with BOM mark at the top of every file and i need to check for its existence...

View Article

Remove headers thar dont match

Good evening I need your help please, im new at Unix and i wanted to remove the first 5 headers for 100000 records files and then create a control file .ctl that contains the number of records and all...

View Article


Get the list with sed or awk

Code: #cat file [General] aa bb cc [Sabino B] dd ee [XXX C] [QQQ D] [zzz D] 77 dd [FAFS EE] gg xx I want to get: when VAR="zzz D" get below out put Code: aa bb cc 77 dd the rules is add General items...

View Article

Shell Scripting needed for the below problem please solve ...

please solve my problem..... :( i have a sample input file as A A A A B B B B B C C C C C i want the output such that if the count of A or B or C is greater than 3 A A A B B B C C C if the count of A...

View Article

How to change core path on AIX?

How can I change core path from current directory to a desired folder on AIX 6.1 which should be only applicable to the shell in which my program is running. I know that chcore with -l option can be...

View Article


Problem with expr command in shell script

Hi, I have used expr command to increment the date. for e.g., case 1 : Code: echo $(date -d $(echo `expr 20010101 + 1`)) it returns Code: Tue Jan 2 00:00:00 IST 2001 case 2: Code: echo $(date -d $(echo...

View Article


Copying lines between two strings

Hello All, I want to copy some lines from one file to other with following condition. Only lines between two specified strings should copy. Example :- Code: "My First String " Some_Other_String .......

View Article

Expdp error logging:

i am using expdp in korn shell to export tables from oracle. What i dont know is how to capture any errors if my expdp fails. I am looking for some options like Spool where i can write the error into a...

View Article

Getting the index of a string in a string

I have a variable Code: $line= Some text with ERR message I want to get the value of the index of ERR and assign to a variable say $index I expect the output Code: echo $index 16 I tried to use match...

View Article

Read Server IP & port from a input file to check connectivity

Hi, I want to create a script that will check the connectivity to a IP address & port using nc command & if there is a connectivity issue, it will send a SMS alert. I have written a basic...

View Article


Override Mailx Command

Hello All, I am working on a project where the requirement is override mailx command in such way that, instead of sending mailing to email addresses coded in codes, it should send mails to one common...

View Article

Reg:SFTP

I have a query in regards to SFTP....We have a SFTP ID/PWD, so say if the password changes Would it fail my SFTP? SFTP uses public/private keys for authentication right? So would it endanger my...

View Article


Bash script to replace a character with another

Hi. I'm a complete noob when it comes to scripting. I have approximately 2000 files scattered throughout different locations that I need to rename. The current files have a character, "." , that needs...

View Article

/var/spool/mqueue issue

Hi guys . I have a solaris machine serving as a DNS server for my environment. Everytime I go into /var/spool/mqueue , there are an aweful lot of emails with names likes: qfqB6ChrpL006644. When I cat...

View Article


Selecting highest value within a range

Within millions of lines of data, there are perhaps 20 "spikes" that are very narrow. I want only the highest value from each spike within a range of 10 rows. Possible? My data looks like this, 8...

View Article

Concatenation of two patterns

Read the lines from the file[file2.txt] and concatenate the lines into single line then search the string "INPUT=" from the another file[file1.txt] and if "INPUT" is present in that file[file1.txt]...

View Article

Convert TZ output to a different format

Friends, I am trying to convert my local server timezone EST to UTC and for which I used the TZ command, see below Code: $ date Thu DecĀ  6 10:14:14 EST 2012 $ $ TZ=UTC date -d '10:14 EST' Thu DecĀ  6...

View Article
Browsing all 16232 articles
Browse latest View live