Sponsored Content
Top Forums UNIX for Dummies Questions & Answers Move File Containing More Than two "-" at 3rd Line To New Directory Post 302939805 by Nexeu on Sunday 29th of March 2015 10:23:29 AM
Old 03-29-2015
Code:
Untitleds-MacBook-Pro:~ Nexeu$ awk 'FNR==3 && 1<gsub ("/", "&") {printf "%s%c", FILENAME, "\000"}' /Users/Nexeu/Documents/TEST/killer.txt | xargs -0 echo mv -t /Users/Nexeu/Documents/IPA
mv -t /Users/Nexeu/Documents/Dictionary/IPA /Users/Nexeu/Documents/TEST/killer.txt
Untitleds-MacBook-Pro:~ Nexeu$

The command is executed successfully but the file still remains at the initial folder. I want to move those that has words more than two - so I tested on file containing this content

Code:
****** killer ******

[test-test-test-test]  
/ˈkɪl ər/
IPA Syllables
    * Examples
    * Word Origin
  noun
1.
a person or thing that kills.
2.
killer whale.
3....

 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Explain the line "mn_code=`env|grep "..mn"|awk -F"=" '{print $2}'`"

Hi Friends, Can any of you explain me about the below line of code? mn_code=`env|grep "..mn"|awk -F"=" '{print $2}'` Im not able to understand, what exactly it is doing :confused: Any help would be useful for me. Lokesha (4 Replies)
Discussion started by: Lokesha
4 Replies

2. Shell Programming and Scripting

awk command to replace ";" with "|" and ""|" at diferent places in line of file

Hi, I have line in input file as below: 3G_CENTRAL;INDONESIA_(M)_TELKOMSEL;SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL My expected output for line in the file must be : "1-Radon1-cMOC_deg"|"LDIndex"|"3G_CENTRAL|INDONESIA_(M)_TELKOMSEL"|LAST|"SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL" Can someone... (7 Replies)
Discussion started by: shis100
7 Replies

3. UNIX for Dummies Questions & Answers

script works well but displays " line 6: =: No such file or directory"

strange :) can you tell why?:cool: #!/bin/bash echo " enter your age " read age if ; then echo " you do not have to pay tax " elif ]; then echo " you are eligible for income tax " else echo " you dont have to pay tax " fi (3 Replies)
Discussion started by: me.
3 Replies

4. UNIX for Dummies Questions & Answers

look for file size greater than "0" of specific pattern and move those to another directory

Hi , i have some files of specific pattern ...i need to look for files which are having size greater than zero and move those files to another directory.. Ex... abc_0702, abc_0709, abc_782 abc_1234 ...etc need to find out which is having the size >0 and move those to target directory..... (7 Replies)
Discussion started by: dssyadav
7 Replies

5. Shell Programming and Scripting

Find lines with "A" then change "E" to "X" same line

I have a bunch of random character lines like ABCEDFG. I want to find all lines with "A" and then change any "E" to "X" in the same line. ALL lines with "A" will have an "X" somewhere in it. I have tried sed awk and vi editor. I get close, not quite there. I know someone has already solved this... (10 Replies)
Discussion started by: nightwatchrenba
10 Replies

6. UNIX for Dummies Questions & Answers

Using "mailx" command to read "to" and "cc" email addreses from input file

How to use "mailx" command to do e-mail reading the input file containing email address, where column 1 has name and column 2 containing “To” e-mail address and column 3 contains “cc” e-mail address to include with same email. Sample input file, email.txt Below is an sample code where... (2 Replies)
Discussion started by: asjaiswal
2 Replies

7. Shell Programming and Scripting

Move a line containg "char" above line containing "xchar"

Okay, so I have a rather large text file and will have to process many more and this will save me hours of work. I'm not very good at scripting, so bear with me please. Working on Linux RHEL I've been able to filter and edit and clean up using sed, but I have a problem with moving lines. ... (9 Replies)
Discussion started by: rex007can
9 Replies

8. Shell Programming and Scripting

Failure: if grep "$Var" "$line" inside while read line loop

Hi everybody, I am new at Unix/Bourne shell scripting and with my youngest experiences, I will not become very old with it :o My code: #!/bin/sh set -e set -u export IFS= optl="Optl" LOCSTORCLI="/opt/lsi/storcli/storcli" ($LOCSTORCLI /c0 /vall show | grep RAID | cut -d " "... (5 Replies)
Discussion started by: Subsonic66
5 Replies

9. Shell Programming and Scripting

Bash script - Print an ascii file using specific font "Latin Modern Mono 12" "regular" "9"

Hello. System : opensuse leap 42.3 I have a bash script that build a text file. I would like the last command doing : print_cmd -o page-left=43 -o page-right=22 -o page-top=28 -o page-bottom=43 -o font=LatinModernMono12:regular:9 some_file.txt where : print_cmd ::= some printing... (1 Reply)
Discussion started by: jcdole
1 Replies

10. AIX

Apache 2.4 directory cannot display "Last modified" "Size" "Description"

Hi 2 all, i have had AIX 7.2 :/# /usr/IBMAHS/bin/apachectl -v Server version: Apache/2.4.12 (Unix) Server built: May 25 2015 04:58:27 :/#:/# /usr/IBMAHS/bin/apachectl -M Loaded Modules: core_module (static) so_module (static) http_module (static) mpm_worker_module (static) ... (3 Replies)
Discussion started by: penchev
3 Replies
ATP(4)							   BSD Kernel Interfaces Manual 						    ATP(4)

NAME
atp -- Apple touchpad driver SYNOPSIS
To compile this driver into the kernel, place the following lines into your kernel configuration file: device atp device usb Alternatively, to load the driver as a module at boot time, place the following line in loader.conf(5): atp_load="YES" DESCRIPTION
The atp driver provides support for the Apple Internal Trackpad device found in many Apple laptops. Older (Fountain/Geyser) and the newer (Wellspring) trackpad families are all supported through a unified driver. The driver simulates a three-button mouse using multi-finger tap detection. Single finger tap generates a left-button click; two-finger tap maps to the middle button; whereas a three-finger tap gets treated as a right button click. There is support for 2-finger horizontal scrolling, which translates to page-back/forward events; vertical multi-finger scrolling emulates the mouse wheel. A double-tap followed by a drag is treated as a selection gesture; a virtual left-button click is assumed for the lifespan of the drag. atp supports dynamic reconfiguration using sysctl(8); through nodes under hw.usb.atp. Pointer sensitivity can be controlled using the sysctl tunable hw.usb.atp.scale_factor. Smaller values of scale_factor result in faster movement. A simple high-pass filter is used to reduce con- tributions from small movements; the threshold for this filter may be controlled by hw.usb.atp.small_movement. The maximum tolerable dura- tion of a touch gesture is controlled by hw.usb.atp.touch_timeout (in microseconds); beyond this period, touches are considered to be slides. (This conversion also happens when a finger stroke accumulates at least hw.usb.atp.slide_min_movement movement (in mickeys). The maximum time (in microseconds) to allow an association between a double- tap and drag gesture may be controlled by hw.usb.atp.double_tap_threshold. Should one want to disable tap detection and rely only upon physical button presses, set the following sysctl to a value of 2 hw.usb.atp.tap_minimum. HARDWARE
The atp driver provides support for the following Product IDs: o PowerBooks, iBooks (IDs: 0x020e, 0x020f, 0x0210, 0x0214, 0x0215, 0x0216) o Core Duo MacBook & MacBook Pro (IDs: 0x0217, 0x0218, 0x0219) o Core2 Duo MacBook & MacBook Pro (IDs: 0x021a, 0x021b, 0x021c) o Core2 Duo MacBook3,1 (IDs: 0x0229, 0x022a, 0x022b) o 12 inch PowerBook and iBook (IDs: 0x030a, 0x030b) o 15 inch PowerBook (IDs: 0x020e, 0x020f, 0x0215) o 17 inch PowerBook (ID: 0x020d) o Almost all recent Macbook-Pros and Airs (IDs: 0x0223, 0x0223, 0x0224, 0x0224, 0x0225, 0x0225, 0x0230, 0x0230, 0x0231, 0x0231, 0x0232, 0x0232, 0x0236, 0x0236, 0x0237, 0x0237, 0x0238, 0x0238, 0x023f, 0x023f, 0x0240, 0x0241, 0x0242, 0x0243, 0x0244, 0x0245, 0x0246, 0x0247, 0x0249, 0x024a, 0x024b, 0x024c, 0x024d, 0x024e, 0x0252, 0x0252, 0x0253, 0x0253, 0x0254, 0x0254, 0x0259, 0x025a, 0x025b, 0x0262, 0x0262, 0x0263, 0x0264, 0x0290, 0x0291, 0x0292) To discover the product-id of a touchpad, search for 'Trackpad' in the output of lshal(1) and look up the property usb_device.product_id. FILES
atp creates a blocking pseudo-device file, /dev/atp0, which presents the mouse as a sysmouse or mousesystems type device--see moused(8) for an explanation of these mouse types. SEE ALSO
sysmouse(4), usb(4), loader.conf(5), xorg.conf(5) (ports/x11/xorg), moused(8), sysctl(8) AUTHORS
The atp driver was written by Rohit Grover <rgrover1@gmail.com>. BSD
February 24, 2014 BSD
All times are GMT -4. The time now is 09:12 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy