New Posts  All Forums:Forum Nav:

UNIX Nub Question - Page 2

post #11 of 20
no doubt that there is a way. however it will cause problems if you run it like that all the time. installers, system configuration, etc.. all use similar style commands. If you make one that automaticly populates for example find when you are done, its going to cause system problems.
Desktop
(13 items)
 
  
CPUMotherboardGraphicsRAM
Q9550 EVGA 780SLi EVGA GTX285SSC 4GB OCZ Reaper HPC Edition 
Hard DriveOptical DriveOSPower
150GB Velociraptor x2 - RAID0 2 - Samsung Write Master's Window 7 64-bit 750 Watt OCZ 60 AMPs on +12v 
CaseMouse
LIAN LI PC-V2110B Black Logitech G3 
  hide details  
Reply
Desktop
(13 items)
 
  
CPUMotherboardGraphicsRAM
Q9550 EVGA 780SLi EVGA GTX285SSC 4GB OCZ Reaper HPC Edition 
Hard DriveOptical DriveOSPower
150GB Velociraptor x2 - RAID0 2 - Samsung Write Master's Window 7 64-bit 750 Watt OCZ 60 AMPs on +12v 
CaseMouse
LIAN LI PC-V2110B Black Logitech G3 
  hide details  
Reply
post #12 of 20
Thread Starter 
Huh? The script would just craft a command based on the output of another command. No other program/script would ever encounter mine because it would only ever be on my syste
It goes to eleven
(13 items)
 
  
CPUMotherboardGraphicsRAM
E6300 DS3 EVGA 8600GTS 2GB XMS2 DDR2-800 
Hard DriveOSMonitorKeyboard
1.294 TB Arch Linux/XP Samsung 226bw Eclipse II 
PowerCaseMouse
Corsair 520HX Lian-Li v1000B Plus G7 
  hide details  
Reply
It goes to eleven
(13 items)
 
  
CPUMotherboardGraphicsRAM
E6300 DS3 EVGA 8600GTS 2GB XMS2 DDR2-800 
Hard DriveOSMonitorKeyboard
1.294 TB Arch Linux/XP Samsung 226bw Eclipse II 
PowerCaseMouse
Corsair 520HX Lian-Li v1000B Plus G7 
  hide details  
Reply
post #13 of 20
I know your system, the operating system itself, uses those commands for normal operations. Even if you are looking at a GUI installer for example its using those shell commands to work.

edit: it would cause problems on your system. or do you mean like make your own command say you type in..

w00t

it then does whatever you made w00t do?
Desktop
(13 items)
 
  
CPUMotherboardGraphicsRAM
Q9550 EVGA 780SLi EVGA GTX285SSC 4GB OCZ Reaper HPC Edition 
Hard DriveOptical DriveOSPower
150GB Velociraptor x2 - RAID0 2 - Samsung Write Master's Window 7 64-bit 750 Watt OCZ 60 AMPs on +12v 
CaseMouse
LIAN LI PC-V2110B Black Logitech G3 
  hide details  
Reply
Desktop
(13 items)
 
  
CPUMotherboardGraphicsRAM
Q9550 EVGA 780SLi EVGA GTX285SSC 4GB OCZ Reaper HPC Edition 
Hard DriveOptical DriveOSPower
150GB Velociraptor x2 - RAID0 2 - Samsung Write Master's Window 7 64-bit 750 Watt OCZ 60 AMPs on +12v 
CaseMouse
LIAN LI PC-V2110B Black Logitech G3 
  hide details  
Reply
post #14 of 20
Thread Starter 
It would just be something like
foobar com1 com2 argnum
It would take the output of com1 and put it into com2 as argument number argnum

Does anybody know how to do this through unix tho?
It goes to eleven
(13 items)
 
  
CPUMotherboardGraphicsRAM
E6300 DS3 EVGA 8600GTS 2GB XMS2 DDR2-800 
Hard DriveOSMonitorKeyboard
1.294 TB Arch Linux/XP Samsung 226bw Eclipse II 
PowerCaseMouse
Corsair 520HX Lian-Li v1000B Plus G7 
  hide details  
Reply
It goes to eleven
(13 items)
 
  
CPUMotherboardGraphicsRAM
E6300 DS3 EVGA 8600GTS 2GB XMS2 DDR2-800 
Hard DriveOSMonitorKeyboard
1.294 TB Arch Linux/XP Samsung 226bw Eclipse II 
PowerCaseMouse
Corsair 520HX Lian-Li v1000B Plus G7 
  hide details  
Reply
post #15 of 20
gotcha, so basicly make your own custom command. Well it is possible however if I recall these commands are compiled into the kernel, What I would do is a bit of research to see if you can find for sure if that is where they are compiled which I am pretty sure it is, but there could be like a .conf file which contains the commands however, if they are in the kernel download a full source for it, rip it apart and see how it works, then recompile your own version. and make sure if you do.... add in a command like this:
type in OCN

it opens firefox and goes to overclock.net haha
Desktop
(13 items)
 
  
CPUMotherboardGraphicsRAM
Q9550 EVGA 780SLi EVGA GTX285SSC 4GB OCZ Reaper HPC Edition 
Hard DriveOptical DriveOSPower
150GB Velociraptor x2 - RAID0 2 - Samsung Write Master's Window 7 64-bit 750 Watt OCZ 60 AMPs on +12v 
CaseMouse
LIAN LI PC-V2110B Black Logitech G3 
  hide details  
Reply
Desktop
(13 items)
 
  
CPUMotherboardGraphicsRAM
Q9550 EVGA 780SLi EVGA GTX285SSC 4GB OCZ Reaper HPC Edition 
Hard DriveOptical DriveOSPower
150GB Velociraptor x2 - RAID0 2 - Samsung Write Master's Window 7 64-bit 750 Watt OCZ 60 AMPs on +12v 
CaseMouse
LIAN LI PC-V2110B Black Logitech G3 
  hide details  
Reply
post #16 of 20
Thread Starter 
You don't need to compile a new kernel. Just make an executable script and copy it into /usr/bin so you don't have to type out the full path name
It goes to eleven
(13 items)
 
  
CPUMotherboardGraphicsRAM
E6300 DS3 EVGA 8600GTS 2GB XMS2 DDR2-800 
Hard DriveOSMonitorKeyboard
1.294 TB Arch Linux/XP Samsung 226bw Eclipse II 
PowerCaseMouse
Corsair 520HX Lian-Li v1000B Plus G7 
  hide details  
Reply
It goes to eleven
(13 items)
 
  
CPUMotherboardGraphicsRAM
E6300 DS3 EVGA 8600GTS 2GB XMS2 DDR2-800 
Hard DriveOSMonitorKeyboard
1.294 TB Arch Linux/XP Samsung 226bw Eclipse II 
PowerCaseMouse
Corsair 520HX Lian-Li v1000B Plus G7 
  hide details  
Reply
post #17 of 20
didnt think about that. hmmm
Desktop
(13 items)
 
  
CPUMotherboardGraphicsRAM
Q9550 EVGA 780SLi EVGA GTX285SSC 4GB OCZ Reaper HPC Edition 
Hard DriveOptical DriveOSPower
150GB Velociraptor x2 - RAID0 2 - Samsung Write Master's Window 7 64-bit 750 Watt OCZ 60 AMPs on +12v 
CaseMouse
LIAN LI PC-V2110B Black Logitech G3 
  hide details  
Reply
Desktop
(13 items)
 
  
CPUMotherboardGraphicsRAM
Q9550 EVGA 780SLi EVGA GTX285SSC 4GB OCZ Reaper HPC Edition 
Hard DriveOptical DriveOSPower
150GB Velociraptor x2 - RAID0 2 - Samsung Write Master's Window 7 64-bit 750 Watt OCZ 60 AMPs on +12v 
CaseMouse
LIAN LI PC-V2110B Black Logitech G3 
  hide details  
Reply
post #18 of 20
I believe if you want to do what I understand, then your probably going to need to write a script. As far as I know -pipe doesn't always work as you would plan it to. Just like on the last question you had on the move command and trying to pipe outout 'mv', it just didn't seem to work they way we expected it to.

You wouldn't need to compile a new kernel. You can find the scripts for the commands under /bin, /sbin, /usr/bin <-(mainly scripts to start user applications though)

Anyway, you can type in the terminal: man pipe to get some info on the pipe function. Maybe that will help you.
BlackMesa
(14 items)
 
  
CPUMotherboardGraphicsRAM
Phenom II x6 Gigabyte XFX RF460 16gb G.Skill 
Hard DriveHard DriveOSMonitor
OCZ Vertex2 Sata II Coorsair Force GS Sata III Debian (testing) Shimian 27" 
KeyboardMouse
Filco w/ blue cherries Who needs a mouse? 
  hide details  
Reply
BlackMesa
(14 items)
 
  
CPUMotherboardGraphicsRAM
Phenom II x6 Gigabyte XFX RF460 16gb G.Skill 
Hard DriveHard DriveOSMonitor
OCZ Vertex2 Sata II Coorsair Force GS Sata III Debian (testing) Shimian 27" 
KeyboardMouse
Filco w/ blue cherries Who needs a mouse? 
  hide details  
Reply
post #19 of 20
#!/usr/bin/perl
use strict;
my $first_param = shift;
my $out = `grep -r $first_param`;
my $final = `sort $out`;
print "$final\
";


throw that in to cmd.pl, then chmod a+x cmd.pl, then: ./cmd.pl whatever

not exactly a 1 line solution (which i'm sure there is) but it can easily be done in perl

btw, perl has both a grep and a sort function, so the above code is useless, but it's just an example.
new rig.
(13 items)
 
  
CPUMotherboardGraphicsRAM
Intel C2D E6600 ASUS P5N-E SLI BFG Tech 8800GTX 2GB Crucial Ballistix DDR2-800 
Hard DriveOSMonitorKeyboard
WD 74GB RAPTOR Windows XP SP2 Samsung SyncMaster 206BW Miscrosoft Natural 4000 
PowerCaseMouseMouse Pad
Thermaltake Toughpower 650W Lian Li PC60BWIN Logitech MX518 Steel Pad 
  hide details  
Reply
new rig.
(13 items)
 
  
CPUMotherboardGraphicsRAM
Intel C2D E6600 ASUS P5N-E SLI BFG Tech 8800GTX 2GB Crucial Ballistix DDR2-800 
Hard DriveOSMonitorKeyboard
WD 74GB RAPTOR Windows XP SP2 Samsung SyncMaster 206BW Miscrosoft Natural 4000 
PowerCaseMouseMouse Pad
Thermaltake Toughpower 650W Lian Li PC60BWIN Logitech MX518 Steel Pad 
  hide details  
Reply
post #20 of 20
find whatever | xargs chown whatever
new rig.
(13 items)
 
  
CPUMotherboardGraphicsRAM
Intel C2D E6600 ASUS P5N-E SLI BFG Tech 8800GTX 2GB Crucial Ballistix DDR2-800 
Hard DriveOSMonitorKeyboard
WD 74GB RAPTOR Windows XP SP2 Samsung SyncMaster 206BW Miscrosoft Natural 4000 
PowerCaseMouseMouse Pad
Thermaltake Toughpower 650W Lian Li PC60BWIN Logitech MX518 Steel Pad 
  hide details  
Reply
new rig.
(13 items)
 
  
CPUMotherboardGraphicsRAM
Intel C2D E6600 ASUS P5N-E SLI BFG Tech 8800GTX 2GB Crucial Ballistix DDR2-800 
Hard DriveOSMonitorKeyboard
WD 74GB RAPTOR Windows XP SP2 Samsung SyncMaster 206BW Miscrosoft Natural 4000 
PowerCaseMouseMouse Pad
Thermaltake Toughpower 650W Lian Li PC60BWIN Logitech MX518 Steel Pad 
  hide details  
Reply
New Posts  All Forums:Forum Nav:
  Return Home
  Back to Forum: Linux, Unix